From: skodak <skodak>
Date: Tue, 25 Dec 2007 20:56:36 +0000 (+0000)
Subject: MDL-12338 prevent KSES from breaking í chars in alt/title tags - credit goes to Eloy... 
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=696c7f753f917ebe16cd47748e6cb4755ab1279d;p=moodle.git

MDL-12338 prevent KSES from breaking í chars in alt/title tags - credit goes to Eloy; merged from MOODLE_19_STABLE
---

diff --git a/lib/kses.php b/lib/kses.php
index 3c04e6626a..578aadfcd0 100644
--- a/lib/kses.php
+++ b/lib/kses.php
@@ -383,7 +383,7 @@ function kses_bad_protocol($string, $allowed_protocols)
 ###############################################################################
 {
   $string = kses_no_null($string);
-  $string = preg_replace('/\xad+/', '', $string); # deals with Opera "feature"
+  $string = preg_replace('/([^\xc3-\xcf])\xad+/', '\\1', $string); # deals with Opera "feature" -- moodle utf8 fix 
   $string2 = $string.'a';
 
   while ($string != $string2)