In the missing mode, substr() function introduced in MDL-8184 patch is now replaced by lang_xhtml_save_substr(). Fixes MDL-8852.
In the missing mode, substr() function introduced in MDL-8184 patch is now replaced by lang_xhtml_save_substr(). Fixes MDL-8852.

There was a problem with pure substr() which could possibly produce XHTML parsing error - see an example:
   substr('Marks &amp; Spencer', 0, 9) -> 'Marks &am' ... is not XHTML compliance
The new function takes care of HTML entities during cutting the string.

dilawar/moodle