Menu

#1 Quoted attribute issue

open
nobody
HTML Parser (1)
5
2007-02-13
2007-02-13
No

There is no way to determine where a quoted attribute ends in advance.

We will assume that the quoted attribute is discarded
- a new line
- at the beginning of another quoted attribute

That is
1. Example
-------------------------------------
<tag attr="several words [NEWLINE]
value"
-------------------------------------
will be parsed to:
tag
attr
several
words [NEWLINE] value

2. Example
-------------------------------------
<tag1 attr="several> <tag2 attr2="value"/>
-------------------------------------
will be parsed to:
tag1
attr
several
tag2
attr
value

That means that we have to start parsing the value of quoted attribute as if it is a regular HTML markup, if one of two mentioned above situations occures. If none of them occures until we reach a closing quote we have to treat all the read text as a value of the quoted attribute.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.