From: dsutch@... Date: 2006-07-25T02:15:05+09:00 Subject: htmltools incorrectly parsing HTML containing server-side tags I'm using HTML Tools 1.09 to parse HTML that contains tags that are to be processed by the web server. For example, here's an image tag: this is a
seperator The <$DCGallery$> will be replaced by some text when returned to the browser by the web server. What I'm noticing is that HTMLTools doesn't handle tags that contain an such an embedded tag. It seems to make an attempt at correcting what it sees as invalid HTML. So the above tag, after going through the parser and having a new class added, using: element.add_attribute('class', ' wide_content') results in the following tag: <$DCGallery$>Separators/gtabseps.gif" alt="this is a seperator"> The image tag is closed after the new class attribute and the server-side tag is duplicated and contains the alt attribute from the original image tag. Has anyone encountered such behavior? I know that HTML Tools probably wasn't built to handle HTML with embedded server-side tags, but for this project I need to process HTML before being served up by the web server. Shouldn't HTML Tools ignore tags found within the quotes of the src attribute's value? Is there an option or patch that might get HTML Tools to ignore tags found within the values of tag attributes?