Menu

#921 elements of htmlparse param list cannot be accessed

open
htmlparse (25)
5
2007-06-08
2007-06-08
No

Here's an example of a tag that has an attribute containing line breaks.

set html {<select onChange="

processFieldChanged(this);
" onFocus="gotFocus(this,'Y');" onBlur="gotFocus(this,'N');"></select>}
<select onChange="

processFieldChanged(this);
" onFocus="gotFocus(this,'Y');" onBlur="gotFocus(this,'N');"></select>

Printing the param list causes no issues:

(bin) 122 % htmlparse::parse $html
==> hmstart {} {} {}
==> select {} {onChange="

processFieldChanged(this);
" onFocus="gotFocus(this,'Y');" onBlur="gotFocus(this,'N');"} {}
==> select / {} {}
==> hmstart / {} {}

But trying to access elements of the param list, which is what the build_data command in the run below does, yields an error:

(bin) 124 % htmlparse::parse -cmd build_data $html
list element in quotes followed by "gotFocus(this,'Y');"" instead of space

Discussion