1
jsliu111
need help about the htmlSpecialChars function
  • 2008/12/1 14:56

  • jsliu111

  • Just popping in

  • Posts: 2

  • Since: 2008/10/7


In the file module.textsanitizer.php, the function htmlSpecialChars has only one piece of code:

return preg_replace(array("/&/i", "/ /i"), array('&', ' '), htmlspecialchars($text, ENT_QUOTES));

Sorry for my code format, there is bug when I put above code in the [code] area.

my question is:
we use the htmlspecialchars to change the html char to Character Codes, why do we need to change the & back to &, and just keep  ?


thanks

Login

Who's Online

220 user(s) are online (186 user(s) are browsing Support Forums)


Members: 0


Guests: 220


more...

Donat-O-Meter

Stats
Goal: AU$15.00
Due Date: Jul 31
Gross Amount: AU$0.00
Net Balance: AU$0.00
Left to go: AU$15.00
Make donations with PayPal!

Latest GitHub Commits