Re: EE1 plugin code/htmlentities() question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29 November 2010 19:24, Micky Hulse <mickyhulse.lists@xxxxxxxxx> wrote:
> Hello,
>
> I was looking at this ExpressionEngine plugin:
>
> <http://expressionengine.com/downloads/details/xml_encode/>
> Description: This plugin converts reserved XML characters to entities.
> ÂIt is used in the RSS templates.
>
> ... Curious about this code:
>
> trim(str_replace(array('&#47;', '&nbsp;'), array("/", '&#160;'), $str));
>
> The plugin author used the above bit of code in the return statement.
>
> Just curious if their is any particular reason why one would want to
> replace &#47; and &nbsp; with / and &#160 respectively?
>
> For example, I am writing a similar plugin which utilizes
> htmlentities()... I guess I am just wondering if I should apply the
> same code as above to my entity-converted string?
>
> Thoughts?
>
> Thanks!
> Micky

I'm guessing that &nbsp; is only valid in HTML.

Not sure why / would be encoded as it isn't anything too special
outside of the closing tag.


-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux