U
Une Bévue
In my test i do have :
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Because i know this declaration is false from Lynx saying it is UTF-8, i
want to change the content attribute by :
meta=doc.at_xpath("/html/head/meta")
meta['content']="text/html; charset=UTF-8" if !meta.nil? &&
meta['http-equiv'].downcase=='content-type'
however, printing meta gives always :
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
that's to say, no change at all.
Is this behaviour implied by the fact the meta tag isn't self closed, ie
not ending by " />" ???
If yes, in that case i could unling all meta tags and create a good one
?
No quicker solution ?
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Because i know this declaration is false from Lynx saying it is UTF-8, i
want to change the content attribute by :
meta=doc.at_xpath("/html/head/meta")
meta['content']="text/html; charset=UTF-8" if !meta.nil? &&
meta['http-equiv'].downcase=='content-type'
however, printing meta gives always :
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
that's to say, no change at all.
Is this behaviour implied by the fact the meta tag isn't self closed, ie
not ending by " />" ???
If yes, in that case i could unling all meta tags and create a good one
?
No quicker solution ?