cakePHP: Overload Sanitize -


in recent cakephp 1.3.4 version discovered sanitize::html returns double encoded html entities - because of newly added fourth parameter of htmlentities 'double_encode'.

here corresponding ticket on cakephp: http://cakephp.lighthouseapp.com/projects/42648/tickets/1152-sanitizehtml-needs-double_encode-parameter-in-htmlentities

since need use cakephp 1.3.4 on php 5.2.14 need change double_encode parameter. there way overload sanitize::html method in cake don't have fiddle core?

you can subclass in /app/libs directory:

app::import('sanitize');  class mysanitize extends sanitize {      public static function html(...) {         ...     }  } 

you'll have switch use mysanitize instead of sanitize, shouldn't big problem. text find/replace can take care of if you're using lot already.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -