It's not valid HTML to nest a double quote within a value (if the value is delimiter is a double quote). ie. This isn't HTML::TokeParer's problem. The double quote in your string should be encoded as """ ie:
value="some text with a 16" wheel text"
| [reply] [d/l] |
Its an asp page the actualy tag when i look at the source from the page is below, note the problem at saloon.18". How do i fix this?
<input style="display:none" name="stradtext" type="text" value="Mercedes-Benz S500 W220 2002 Zircon Silver Anthracite trim, 4dr Sedan 4.96ltr 8 Cyls Petrol 5sp Auto, 22884kms, One owner. Fully optioned luxury saloon.18" alloy wheels. Low kilometres. Inspection will not disappoint., ABS, Air Bag, Air Con, CD Player, C'lock, Climate Control, Cruise cont, Electric Seats, Immobiliser, Leather, Logbooks, Mags, Metallic Paint, Phone Kit, Pwr Mirrors, Pwr Windows, Pwr Steer, Radio Cass, Speed Alert, Sunroof, Traction Control, Trip Computer, 802GZE $189950.00 Briggs Carse Moloney 779 Kingsford Smith Drv Eagle Farm (07)36302244">
| [reply] [d/l] |
I think this is where one is supposed to use a '%HH' expression to safely invoke/evoke the "special" character (double quote in this case) without screwing up everything else:
... saloon.18%22 alloy...
The same might apply to the apostrophe that occurs later in the same string (replace it with "%27"), and since you'll be doing stuff in perl with this string, you'd better treat the dollar sign as well ("%24").
By any chance, has something already been done to this text, in terms of "decoding" uri escapes, before you get to the point in your script that throws the error? If so, maybe just postpone doing that sort of step until later in the script.
Update (oops): As tye points out in the following reply, I'm wrong -- it's not a URI-escape thing, it's an HTML Entity thing. So, my question should have been phrased "has something been done to decode HTML entity references (like ")?" If so, don't do that, or do it later. | [reply] [d/l] [select] |
Sounds like you're trying to parse invalid HTML. You'll probably need to fix your input data. Where are you getting it from?
--
< http://www.dave.org.uk>
"The first rule of Perl club is you do not talk about
Perl club." -- Chip Salzenberg
| [reply] |