text box leaks garbage out
Reported by Matt O'Gorman | April 8th, 2010 @ 05:55 AM
if i load up a text box with text "hello world" and then pull it back out with wf:q I get "hello world" out where the space is a 160 space rather than a normal one. any idea whats going on here?
Comments and changes to this ticket
-
Brian O April 22nd, 2010 @ 01:33 PM
Yes. wf:html_encode() converts spaces to non breaking spaces (among a few other things). This is sometimes an OK feature for display purposes (if that's what you want), but is disastrous in a case like this.
I would submit that html_encode() should not encode spaces and tabs, but should concern itself with only encoding quotes ('"), angle brackets (<>), and ampersands (&). It's an easy fix. Just remove those other cases from wf_convert:html_encode().
As a workaround, you can do:
#textbox{html_encode=false, my_own_html_encode_that_does_not_encode_spaces(Value)}
I believe this should be fixed at the framework level. Nitrogen has this great automatic HTML encoding, but we can't use it because of this.
-
Rusty Klophaus June 29th, 2010 @ 08:00 PM
- Milestone cleared.
- Milestone order changed from 0 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Nitrogen Web Framework for Erlang