Ticket #14 (closed defect: fixed)
Tag parsing funky-ness, or how I learned to stop worrying and love the malformed tag
| Reported by: | taph20guru | Owned by: | somebody |
|---|---|---|---|
| Priority: | trivial | Milestone: | 0.5 |
| Component: | component1 | Version: | 1.0 |
| Keywords: | Cc: |
Description
You can debate if this is a defect or enhancement, either way my code no-worky.
<preface> So there I am writing up a nice little auto-login program that will connect to my favorite website and grab or throw data at the said website without me having to login manually. I get to the part where I pull the login page into Hpricot and figure out where the username and password fields are and where the mighty 'action' element points to in the form field. BUT - whomever wrote this website's HTML code must have been distracted and mis-typed the form tag! Alas Hpricot will not find it!! Sad days to follow... </preface>
Form tags looks like: <form name='loginForm' method='post' action='/units/a/login/1,13088,779-1,00.html'?URL=> (_GASP_... see the ?URL= crap at the end of the tag??! No wonder Hprocot finds no *real* form tag a moves on!)
Oh yes - I've tried the old :fixup_tags and even threw :xhtml_strict at it for good measure to see if that helps. No dice. I'm a-figurin' that it doesn't think the form tag even exists and therefore no fix-up love.
Can we find a way to love this ugly form tag for the way that it is? Do I have to take it to some form of XHTML therapy? Will that be covered by my heath insurance benefits? Will I ever find auto-login nirvana?!? Can the mighty _why reach down and grant up peace in this sick little world and save my lost soul!!?!?
Ok - if can't be fixed I'll live, but good heck there should be a way around it!
