[pLog-svn] r5062 - plog/branches/lifetype-1.2/class/data

Oscar Renalias oscar at renalias.net
Mon Mar 12 09:09:39 EDT 2007


Did you find the reason why and who made this change? It would be
worth checking before reverting the changes...

On 3/12/07, mark at devel.lifetype.net <mark at devel.lifetype.net> wrote:
> Author: mark
> Date: 2007-03-12 09:08:27 -0400 (Mon, 12 Mar 2007)
> New Revision: 5062
>
> Modified:
>    plog/branches/lifetype-1.2/class/data/textfilter.class.php
> Log:
> Fixed the htmlDecode for CJK characters.
>
> Modified: plog/branches/lifetype-1.2/class/data/textfilter.class.php
> ===================================================================
> --- plog/branches/lifetype-1.2/class/data/textfilter.class.php  2007-03-12 12:56:35 UTC (rev 5061)
> +++ plog/branches/lifetype-1.2/class/data/textfilter.class.php  2007-03-12 13:08:27 UTC (rev 5062)
> @@ -233,12 +233,13 @@
>                  */
>                 function htmlDecode( $htmlString, $quote_style = ENT_QUOTES )
>                 {
> -                // replace numeric entities
> +            // replace numeric entities
>              $htmlString = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $htmlString);
>              $htmlString = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $htmlString);
> -                // replace literal entities
> -            $trans_tbl = get_html_translation_table(HTML_ENTITIES);
> +            // replace literal entities
> +            $trans_tbl = get_html_translation_table( HTML_SPECIALCHARS, $quote_style );
>              $trans_tbl = array_flip($trans_tbl);
> +            $trans_tbl['&#39;'] = "'";
>              return strtr($htmlString, $trans_tbl);
>                 }
>
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>


More information about the pLog-svn mailing list