XSS filtering and HTML

[eluser]Ahmed Nuaman[/eluser]

I kept getting the error:

<br />

<b>Fatal error</b>:  Call to undefined function get_instance() in <b>D:\XXXX\wwwroot

\system\libraries\Input.php</b> on line <b>855</b><br />

PHP Fatal error:  Call to undefined function get_instance() in D:\XXXX\wwwroot\system

\libraries\Input.php on line 855

I fixed it by:

function _html_entity_decode_callback($match)
        /*$CI =& get_instance();
        $charset = $CI->config->item('charset');*/
        $CFG =& load_class('Config');
        $charset = $CFG->item('charset');

        return $this->_html_entity_decode($match[0], strtoupper($charset));

I hope that's cool.

[eluser]Derek Jones[/eluser]
Are you running the latest release, Ahmed? This was addressed awhile back by referencing the global $CFG.

[eluser]Derek Jones[/eluser]
Sorry, I see that it was only made in the SVN and never made it to the download. Checkout the latest from the SVN and you'll be fine; we're working on buttoning up 1.6 for a release that will include this fix officially.

[eluser]Ahmed Nuaman[/eluser]
I haven't got the latest release I'm afraid. I'm going to wait 'til the stable release and upgrade. Also, I've noticed a few errors with the Email class. I've had to temporally moved to PHPMailer.

[eluser]Derek Jones[/eluser]
I just meant the Input file, or at least the fix therein. No need to call load_class(), see this bug report for details.

If you wouldn't mind, what errors with the Email class? Have you started a forum thread or bug report for the errors?

[eluser]Ahmed Nuaman[/eluser]
Yeah I did, no one got back to me. It seems that when sending out a HTML email, our mail server sees the incoming email and reports that the headers are incorrect and then flushes it. I'm afraid I can't tell you any more than that (I think).

[eluser]Derek Jones[/eluser]
If you could just point me to the threads...

[eluser]Ahmed Nuaman[/eluser]

Also, do you have an idea on this thread:


[eluser]Derek Jones[/eluser]
Thanks, I'll take a look a the email issue with you in that thread.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.