]> git.mjollnir.org Git - moodle.git/commitdiff
user profiles MDL-16213 prevent ul tags in user profiles leading to invalid xhtml
authorAndrew Davis <andrew@affinitysoftware.net>
Fri, 27 Nov 2009 02:15:09 +0000 (02:15 +0000)
committerAndrew Davis <andrew@affinitysoftware.net>
Fri, 27 Nov 2009 02:15:09 +0000 (02:15 +0000)
lib/weblib.php

index 69dc1f0563613683eeaaf3ce3d460e23ffabffdb..37c148f505c0da0a74a1e352d8cb22a0ebec3205 100644 (file)
@@ -1580,7 +1580,7 @@ function get_emoticons_list_for_help_file() {
  * @global object
  * @param string $text The string to convert.
  * @param boolean $smiley Convert any smiley characters to smiley images?
- * @param boolean $para If true then the returned string will be wrapped in paragraph tags
+ * @param boolean $para If true then the returned string will be wrapped in div tags
  * @param boolean $newlines If true then lines newline breaks will be converted to HTML newline breaks.
  * @return string
  */
@@ -1609,9 +1609,10 @@ function text_to_html($text, $smiley=true, $para=true, $newlines=true) {
         replace_smilies($text);
     }
 
-/// Wrap the whole thing in a paragraph tag if required
+/// Wrap the whole thing in a div if required
     if ($para) {
-        return '<p>'.$text.'</p>';
+        //return '<p>'.$text.'</p>'; //1.9 version
+        return '<div class="text_to_html">'.$text.'</div>';
     } else {
         return $text;
     }