mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 21:12:26 +00:00
LibXML: Resolve the entity reference definition in DTDs
Fixes the rendering of `<` in XHTML docs.
This commit is contained in:
parent
5c23ef1596
commit
4d3f764d95
Notes:
github-actions[bot]
2024-10-12 21:01:04 +00:00
Author: https://github.com/alimpfard
Commit: 4d3f764d95
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1751
1 changed files with 6 additions and 3 deletions
|
@ -1631,14 +1631,17 @@ ErrorOr<ByteString, ParseError> Parser::parse_entity_value()
|
|||
break;
|
||||
if (m_lexer.next_is('%')) {
|
||||
auto start = m_lexer.tell();
|
||||
// FIXME: Resolve this PEReference.
|
||||
TRY(parse_parameter_entity_reference());
|
||||
builder.append(m_source.substring_view(start, m_lexer.tell() - start));
|
||||
continue;
|
||||
}
|
||||
if (m_lexer.next_is('&')) {
|
||||
auto start = m_lexer.tell();
|
||||
TRY(parse_reference());
|
||||
builder.append(m_source.substring_view(start, m_lexer.tell() - start));
|
||||
auto reference = TRY(parse_reference());
|
||||
if (auto char_reference = reference.get_pointer<ByteString>())
|
||||
builder.append(*char_reference);
|
||||
else
|
||||
builder.append(TRY(resolve_reference(reference.get<EntityReference>(), ReferencePlacement::AttributeValue)));
|
||||
continue;
|
||||
}
|
||||
builder.append(m_lexer.consume());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue