Merge branch 'MDL-61359-master' of git://github.com/mickhawkins/moodle
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -553,15 +553,13 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/cust
|
||||
* @return {String} The altered text
|
||||
*/
|
||||
Contacts.prototype._getContactText = function(text) {
|
||||
// Remove the HTML tags to render the contact text.
|
||||
text = $(document.createElement('div')).html(text).text();
|
||||
|
||||
if (text.length > this._messageLength) {
|
||||
text = text.substr(0, this._messageLength - 3);
|
||||
text += '...';
|
||||
}
|
||||
|
||||
return text;
|
||||
// Text node prevents script injection through HTML entities.
|
||||
return document.createTextNode(text);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user