http://qs1969.pair.com?node_id=507675


in reply to Parsing HTML tags with regex

Being picky again and, correct me anyone knowing better, but <select name="url>adee" value="wq<ew"> is not legal HTML. It has to be encoded as <select name="url&gt;adee" value="wq&lt;ew">


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Replies are listed 'Best First'.
Re^2: Parsing HTML tags with regex
by Perl Mouse (Chaplain) on Nov 14, 2005 at 11:17 UTC
    Being picky again and, correct me anyone knowing better, but <select name="url>adee" value="wq<ew"> is not legal HTML.
    I know better. You are wrong. It is legal HTML. Don't let the fact some browsers can't parse it fool you.
    Perl --((8:>*
Re^2: Parsing HTML tags with regex
by jithoosin (Scribe) on Nov 11, 2005 at 11:59 UTC
    Hi skeeve,
    the actual thing was <select name="url" style="width:125px" size="1" onchange="if (this.selectedIndex>0) parent.location.href=this.options[this.selectedIndex].value;">.
    I just used replaced it.
      That's not legal html either.

      Oh, sure, people put crap like that on their html pages, but it's not legal html - throw it at any html validator.

      The legal version of that is:

      <select name="url" style="width:125px" size="1" onchange="if (this.sel +ectedIndex&gt;0) parent.location.href=this.options[this.selectedIndex +].value;">
      --
      @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/