Tried using tax against a piece of html like this:
<span style='font-family:Arial;mso-fareast-font-family:
"MS Mincho"'>FINDINGS</span>
parsing failed on the single quotes, but I was able to
make it work properly after changing the sub line in
tax::parse from:
set sub "\}\n$cmd {\\2} \[expr \{{\\1} ne \"\"\}\]
\[expr \{{\\4} ne \"\"\}\] \
\[regsub -all -- \{\\s+|(\\s*=\\s*)\} {\\3} \" \"\] \{"
to:
set sub "\}\n$cmd {\\2} \[expr \{{\\1} ne \"\"\}\]
\[expr \{{\\4} ne \"\"\}\] \
\[regsub -all -- \{\\s+|(\\s*=\\s*)\} \[regsub -all
-- \{\\s*=\\s*'(\[^'\]+)'\} {\\3} \{ \{\\\\1\}\}\] \"
\"\] \{"
I'm still an amatuer at tcl, so my brain hurts now ;-)
A diff is attached as well.
-MJ
Handle single quoting in tax
Logged In: YES
user_id=897640
Additionally, in tax::output, I think it may be a good idea
to change:
puts -nonewline " $p=\"$properties($p)\""
to:
regsub -all \" $properties($p) {\&quot;} prop
puts -nonewline " $p=\"$prop\""