Skip to content

Text not processed through Moodle filters #2

Description

@michael-milette

As I run multilingual sites, I was pleased to see that you have included a dropdown to select from a list of languages.

However, when I view the site using the crisp theme, I notice that the site name is not processed through the Moodle filters. As a result, multilingual strings that get filtered in other themes do not in crisp on Moodle 2.7. Here is the problematic line from layout/header.php:

 <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo $SITE->fullname; ?></a>

The solution is to wrap $SITE->fullname in a format_string() function as follows:

 <a class="brand" href="<?php echo $CFG->wwwroot;?>"><?php echo format_string($SITE->fullname); ?></a>

I haven't fully tested your theme however you may be wise to check around to see if there are other places that should also be but are not processed through either format_string() for short strings and format_text() for longer text.

Best regards,

 Michael Milette

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions