grinnellplans / grinnellplans-php

Automatically exported from code.google.com/p/grinnellplans
Other
7 stars 7 forks source link

html entity weirdness #259

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
1. Edit your plan. Write this: "&. &. &. &."
2. Save plan. Look at plan. You should see "&. &. &. &."
3. Edit your plan again. Notice that the edit text now says "&. &. &. &." 

What is the expected output? What do you see instead?
I would expect the function converting input text to display text, and the 
reverse, to be a bijection.

Other pertinent information (browser version, revision number, etc):
Chromium/Linux 29.0.1547.57 Debian jessie/sid (217859)

Original issue reported on code.google.com by saul.stj...@gmail.com on 13 Sep 2013 at 5:00

GoogleCodeExporter commented 9 years ago
Looks like edit.php needs to call htmlentites() on the edit_text before putting 
it in the textbox. There's some fun to be had here - for example, put "<!--" in 
your plan's text, and it'll break the edit page in a way that would be very 
difficult for an average user to fix. Fun!

Original comment by a...@alexcohn.com on 13 Sep 2013 at 5:08

GoogleCodeExporter commented 9 years ago
Lulz, I've actually used this bug as a feature when I wanted to pad text using 
non-breaking spaces. I write  's in my update and then do two roundtrips 
through the edit form. Anyway I have a better way of doing it now and we should 
probably fix this. Thanks for reporting it.

Original comment by umhecbaa on 13 Sep 2013 at 5:19

GoogleCodeExporter commented 9 years ago
Oh, this should probably be merged with issue 54 if it's general to all html 
entities.

(Umhecbaa (?), you can also use U+2008 to pad text in a plan without the round 
trip. I don't get what's up with whitespace on plans at all.)

Original comment by saul.stj...@gmail.com on 13 Sep 2013 at 6:15