mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-36157 block_rss_client: Don't double escape titles.
This commit is contained in:
parent
9d10d64e14
commit
345a010ea4
1 changed files with 6 additions and 2 deletions
|
@ -205,9 +205,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($feedrecord->preferredtitle)){
|
if(empty($feedrecord->preferredtitle)){
|
||||||
|
// Simplepie does escape HTML entities.
|
||||||
$feedtitle = $this->format_title($simplepiefeed->get_title());
|
$feedtitle = $this->format_title($simplepiefeed->get_title());
|
||||||
}else{
|
}else{
|
||||||
$feedtitle = $this->format_title($feedrecord->preferredtitle);
|
// Moodle custom title does not does escape HTML entities.
|
||||||
|
$feedtitle = $this->format_title(s($feedrecord->preferredtitle));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->config->title)){
|
if (empty($this->config->title)){
|
||||||
|
@ -265,10 +267,12 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Strips a large title to size and adds ... if title too long
|
* Strips a large title to size and adds ... if title too long
|
||||||
|
* This function does not escape HTML entities, so they have to be escaped
|
||||||
|
* before being passed here.
|
||||||
*
|
*
|
||||||
* @param string title to shorten
|
* @param string title to shorten
|
||||||
* @param int max character length of title
|
* @param int max character length of title
|
||||||
* @return string title s() quoted and shortened if necessary
|
* @return string title shortened if necessary
|
||||||
*/
|
*/
|
||||||
function format_title($title,$max=64) {
|
function format_title($title,$max=64) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue