simplebits / Pears

http://pea.rs
GNU General Public License v2.0
1.4k stars 162 forks source link

Pears HTML input replaces special characters in Edit Post #30

Open terribold opened 12 years ago

terribold commented 12 years ago

I haven't done extensive testing on which special characters, but my case caused fairly serious issues. I'm creating a style guide and wanted to mark up pre and code outputs. The example output is:

<?php 
echo 'Hello World!';
?>

When I used this initially, the page treated the angle brackets as closing tags, which then caused everything below to act oddly. In the Pears HTML field, I replaced the angle brackets as follows:

&#60;?php 
echo 'Hello World!';
?&#62;

When I update the page, this fixes the page but the Pears HTML field replaces the entities with the characters they would render to, causing subsequent updates to be broken again. I don't know how many other special characters do would do this or how many of those would cause page issues after submission.