Would using htmlspecialchars() patch all the XSS exploits of Illumina?

Results 1 to 2 of 2
  1. #1
    Account Upgraded | Title Enabled! PR0 is offline
    MemberRank
    Mar 2007 Join Date
    1,206Posts

    Would using htmlspecialchars() patch all the XSS exploits of Illumina?

    I'm just a beginner in HTML and PHP, barely even qualified enough to call myself that though. I'm wondering if I put it at the beginning of ever page, and wrap the whole page in it if it would patch them all? For example:

    PHP Code:
    <?php
    $str 
    "A 'quote' is <b>bold</b>";

    echo 
    htmlentities($str);
    echo 
    htmlentities($strENT_QUOTES);
    ?>



    Shows up as: A 'quote' is &lt;b&gt;bold&lt;/b&gt;



    How can I apply this to Illumina? Thanks :)


  2. #2
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,608Posts

    Re: Would using htmlspecialchars() patch all the XSS exploits of Illumina?

    For user input I prefer to filter out all the html with htmlspecialchars and then I make sure I escape the string with mysql_real_escape_string(); when using mysql. If using prepared statements it doesnt really matter but still filter the html.

    Could you give a example of a XSS exploit in illumina



Advertisement