Re: WOText Escape HTML Broken?
Re: WOText Escape HTML Broken?
- Subject: Re: WOText Escape HTML Broken?
- From: "Mr. Frank Cobia" <email@hidden>
- Date: Sun, 3 Aug 2008 20:13:26 -0400
You are correct. I did not investigate the behavior enough. I thought
it was not working because WOText inherits from WOInput which has some
"EscapeHTML" methods. But it turns out I do not need them.
I thought I had to have "<br>" in my textarea to get the proper
behavior since HTML normally interprets newline to be a blank space,
but after reading your reply I checked and the textarea does interpret
newlines as newlines.
Thanks,
Frank
On Aug 3, 2008, at 3:53 PM, Rams wrote:
On Aug 2, 2008, at 4:06 PM, Mr. Frank Cobia wrote:
The "escapeHTML" binding has not effect on WOText (or ERXWOText).
Is this the way it is supposed to behave or is it broken. I am
using WO 5.4.2 on Mac OS.
I think escapeHTML is only for text display (WOString) and not for
text input(WOText). Only bindings for name, value, and disabled
seem to be available for WOText.
As a follow up question, whether it is broken or not, is there a
way for me to create a textarea without the HTML being escaped? All
I am really looking for is to insert <br> into the text.
If you want to display a WOString without escaping HTML, you'll
probably have to parse the input from your WOText and remove
anything that isn't a <br /> yourself. I'm using Jericho HTML
parser and it works quite nicely.
For your purposes, that may be overkill. Alternately, although I've
never used it myself, it appears you could bind an
er.extensions.formatters.ERXSimpleHTMLFormatter to your WOString's
formatter binding to convert the line breaks.
rg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden