I tried to use a double quotation mark in the content of a oneline content block.
First input and submit works as expected, however, when I subsequently try to edit the page everything following the double quotation mark is lost.
The source of the problem seems to be that quotation marks are not escaped or htmlencoded in the input text box. The source code of the edit page shows for example
with the value field prematurely "ending" after equal sign.
Has anybody else experienced this problem? Is there a known workaround?
I have already tried to set wysiwyg to true and false, but the setting didn't change behavior. Using single quotation marks as a workaround doesn't help as I want to use a variable in a parameter which has to be quoted.
I hope I didn't miss something obvious?
Thank you!
Bash
[Solved] Double quotation mark breaks edit of oneline content block
[Solved] Double quotation mark breaks edit of oneline content block
Last edited by Bash Gordon on Mon Mar 31, 2008 12:54 pm, edited 1 time in total.
Re: Double quotation mark breaks edit of oneline content block
Hello Bash,
Pierre M.
Not tried :Bash Gordon wrote: The source of the problem seems to be that quotation marks are not escaped or htmlencoded in the input text box. The source code of the edit page shows for example
with the value field prematurely "ending" after equal sign.
Pierre M.
Re: Double quotation mark breaks edit of oneline content block
Hello Pierre,
{mytag par="foo $lang bar"}
and then single quotes no longer work.
Thank you! Best,
Bash
Could you give me hint which functions generate the edit pages? Sorry, I have no idea where to start searching.Pierre M. wrote: Not tried :
Yes, but unfortunately this doesn't work (as described above). Actually I want to have a smarty tag with a parameter including a string and a variable, e.g. like thisPierre M. wrote:
{mytag par="foo $lang bar"}
and then single quotes no longer work.
Thank you! Best,
Bash
Re: Double quotation mark breaks edit of oneline content block
Can you not do:
$par_val = "foo ".$lang." bar";
{mytag par="$par_val"}
Nullig
$par_val = "foo ".$lang." bar";
{mytag par="$par_val"}
Nullig
Re: Double quotation mark breaks edit of oneline content block
Yes, this should also work, thanks!Nullig wrote: $par_val = "foo ".$lang." bar";
{mytag par="$par_val"}
I searched the source code and found the relevant line (231) in lib/classes/contenttypes/Content.inc.php (version 1.2.3, Black Rock):
Code: Select all
$ret[]= array(ucwords($blockName).':','<input type="text" name="'.$blockNameId['id'].'" value="'.$this->GetPropertyValue($blockNameId['id']).'" />');
Code: Select all
cms_htmlentities($this->GetPropertyValue($blockNameId['id']))
Thank you, best
Bash
[Solved] Re: Double quotation mark breaks edit of oneline content block
Solved in 1.2.4. Thank you for the fast inclusion of the patch!
Best,
Bash
Best,
Bash