Skip to content

Commit bee2d62

Browse files
authored
Trim leading and trailing whitespace characters for the HTML parsing option (#1687)
1 parent 40be935 commit bee2d62

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/platform/SAXParser.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
Copyright (c) 2013 Martell Malone
55
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
66
Copyright (c) 2019-2020 simdsoft.com, @HALX99
7+
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).
8+
9+
https://axmolengine.github.io/
710
811
Permission is hereby granted, free of charge, to any person obtaining a copy
912
of this software and associated documentation files (the "Software"), to deal
@@ -134,8 +137,8 @@ bool SAXParser::parseIntrusive(char* xmlData, size_t dataLength, ParseOption opt
134137
break;
135138
case ParseOption::HTML:
136139
xsxml::xml_sax3_parser::parse<xsxml::parse_normal | xsxml::parse_html_entity_translation |
137-
xsxml::parse_normalize_whitespace>(xmlData, static_cast<int>(dataLength),
138-
handler);
140+
xsxml::parse_normalize_whitespace | xsxml::parse_trim_whitespace>(
141+
xmlData, static_cast<int>(dataLength), handler);
139142
break;
140143
case ParseOption::TRIM_WHITESPACE:
141144
xsxml::xml_sax3_parser::parse<xsxml::parse_normal | xsxml::parse_trim_whitespace>(

0 commit comments

Comments
 (0)