Pre-subnode update.
This commit is contained in:
@ -149,12 +149,18 @@ void Xml::load(Xml *xml, std::string data, size_t *j) {
|
||||
case XML_PARSE_STATE_PARSING_VALUE:
|
||||
// Keep parsing child until we find a < for an opening/closing tag.
|
||||
if(c == '<' && !(data[i] == '<' || data[i-2] == '<')) {
|
||||
// In HTML Spec there could be a child here but not in XML spec.
|
||||
doing = XML_PARSE_STATE_PARSING_CLOSE;
|
||||
xml->value = buffer;
|
||||
buffer.clear();
|
||||
valueIsInWhitespace = false;
|
||||
bufferWhitespaces.clear();
|
||||
if(data[i] == '/') {
|
||||
// In HTML Spec there could be a child here but not in XML spec.
|
||||
doing = XML_PARSE_STATE_PARSING_CLOSE;
|
||||
xml->value = buffer;
|
||||
buffer.clear();
|
||||
valueIsInWhitespace = false;
|
||||
bufferWhitespaces.clear();
|
||||
continue;
|
||||
}
|
||||
|
||||
std::cout << "Detected unsupported use of a child within a node value, e.g. <div>Hello <b>world</b> how are you?</div>" << std::endl;
|
||||
throw "Test";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user