| Ticket UUID: | 1733442 | |||
| Title: | elements of htmlparse param list cannot be accessed | |||
| Type: | Bug | Version: | None | |
| Submitter: | al_chou | Created on: | 2007-06-08 13:09:39 | |
| Subsystem: | htmlparse | Assigned To: | andreas_kupries | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2026-11-21 11:06:49 | |
| Resolution: | By Design | Closed By: | serhiy.storchaka | |
| Closed on: | 2026-11-21 11:06:48 | |||
| Description: |
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
| |||
| User Comments: |
serhiy.storchaka added on 2026-11-21 11:06:49:
The param argument is the raw attribute text from the tag, not a Tcl list, so list commands fail on values with quotes or spaces. Parsing attributes is requested in [3000165fff]. | |||
Home
Blog
Docs
Downloads
Tickets
Timeline
Branches
Tags
Wiki