Permalink
Browse files

Fixes MDL-14377 UTF8 misconversions in search results

  • Loading branch information...
1 parent 504c188 commit ff3af6786d306fe772a82e0119b7db5161065511 diml committed Apr 17, 2008
@@ -296,6 +296,6 @@ function chat_check_text_access($path, $itemtype, $this_id, $user, $group_id, $c
function chat_link_post_processing($title){
setLocale(LC_TIME, substr(current_language(), 0, 2));
$title = preg_replace('/TT_(.*)_TT/e', "userdate(\\1)", $title);
- return $title;
+ return mb_convert_encoding($title, 'UTF-8', 'auto');
}
?>
@@ -399,4 +399,13 @@ function data_check_text_access($path, $itemtype, $this_id, $user, $group_id, $c
return true;
}
+
+/**
+* post processes the url for cleaner output.
+* @param string $title
+*/
+function data_link_post_processing($title){
+ return mb_convert_encoding($title, 'UTF-8', 'auto');
+}
+
?>
@@ -297,4 +297,12 @@ function forum_check_text_access($path, $itemtype, $this_id, $user, $group_id, $
return true;
}
+/**
+* post processes the url for cleaner output.
+* @param string $title
+*/
+function forum_link_post_processing($title){
+ return mb_convert_encoding($title, 'UTF-8', 'auto');
+}
+
?>
@@ -251,7 +251,7 @@ function glossary_check_text_access($path, $itemtype, $this_id, $user, $group_id
* @param string $title
*/
function glossary_link_post_processing($title){
- return mb_convert_encoding($title, 'auto', 'UTF-8');
+ return mb_convert_encoding($title, 'UTF-8', 'auto');
}
?>
@@ -204,4 +204,13 @@ function lesson_check_text_access($path, $itemtype, $this_id, $user, $group_id,
return true;
}
+
+/**
+* this call back is called when displaying the link for some last post processing
+*
+*/
+function lesson_link_post_processing($title){
+ return mb_convert_encoding($title, 'UTF-8', 'auto');
+}
+
?>
@@ -323,6 +323,6 @@ function resource_check_text_access($path, $itemtype, $this_id, $user, $group_id
* @param string $title
*/
function resource_link_post_processing($title){
- return mb_convert_encoding($title, 'auto', 'UTF-8');
+ return mb_convert_encoding($title, 'UTF-8', 'auto');
}
?>
@@ -290,4 +290,12 @@ function techproject_check_text_access($path, $entry_type, $this_id, $user, $gro
return true;
} //techproject_check_text_access
+/**
+* this call back is called when displaying the link for some last post processing
+*
+*/
+function techproject_link_post_processing($title){
+ return mb_convert_encoding($title, 'UTF-8', 'auto');
+}
+
?>
@@ -262,4 +262,13 @@ function wiki_check_text_access($path, $itemtype, $this_id, $user, $group_id, $c
return true;
}
+
+/**
+* this call back is called when displaying the link for some last post processing
+*
+*/
+function wiki_link_post_processing($title){
+ return mb_convert_encoding($title, 'UTF-8', 'auto');
+}
+
?>

0 comments on commit ff3af67

Please sign in to comment.