Bug #6691
Backslash in Textfield ViewHelper
Status: | Resolved | Start date: | 2010-03-04 | |
---|---|---|---|---|
Priority: | Could have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | - | |||
Has patch: | Affected Flow version: |
Description
This:<f:form.textfield name="somename" value="F3\" size="60" />
results in the following HTML code:
<input type="text" name="somename" value="F3" size=" />
I would expect the following (as is the case if you write plain HTML):
<input type="text" name="somename" value="F3\" size="60" />
History
#1 Updated by Michael Sauter over 5 years ago
Ah, sorry for the wrong less then / greater then symbols ... should be < and > of course.
#2 Updated by Christian Müller over 5 years ago
Michael Sauter wrote:
Ah, sorry for the wrong less then / greater then symbols ... should be < and > of course.
Slashing the slash should help so ...F3\\" should work. So this is a no bug for me.
#3 Updated by Michael Sauter over 5 years ago
Christian Mueller wrote:
Slashing the slash should help so ...F3\" should work. So this is a no bug for me.
This doesn't work in alpha8 for me.
But, even if it would work, I would still consider this a bug. From a non-technical point of view, the Fluid language is just XML. So IMHO it should behave like HTML/XML, and not like something that is parsed by PHP. If it's impossible to accomplish that, escaping would be fine for me as long as it is stated somewhere that I have to escape backslashes.
#4 Updated by Christian Müller about 5 years ago
Christian Mueller wrote:
Michael Sauter wrote:
Ah, sorry for the wrong less then / greater then symbols ... should be < and > of course.
Slashing the slash should help so ...F3\" should work. So this is a no bug for me.
Sorry for the delay. Well it is all about the parser, it allows a \" inside a value string, so that won't work. Fortunatly ' (single-quote) is also allowed in view-helper syntax, so try if that works for you:
<f:form.textfield name="somename" value='F3\' size="60" />
#5 Updated by Sebastian Kurfuerst about 5 years ago
- Status changed from New to Needs Feedback
- Priority changed from Should have to Could have
#6 Updated by Michael Sauter about 5 years ago
Thanks for the hint, single-quote works.
#7 Updated by Christian Müller about 5 years ago
- Status changed from Needs Feedback to Resolved
nothing more to do.