html: Restore handling of "br" tags

This fully reverts commit 2119ce9.
Seems like Flash does handle "br" tags, but ignores them under some
unknown circumstances (e.g. setting `htmlText` in AVM1).
For now handle "br" tags unconditionally.
This commit is contained in:
relrelb 2021-11-14 21:48:28 +02:00 committed by relrelb
parent 60c2a14363
commit 855bc721a8
1 changed files with 2 additions and 2 deletions

View File

@ -585,7 +585,7 @@ impl FormatSpans {
};
let mut format = format_stack.last().unwrap().clone();
match &e.name().to_ascii_lowercase()[..] {
b"sbr" => {
b"br" | b"sbr" => {
text.push('\n');
if let Some(span) = spans.last_mut() {
span.span_length += 1;
@ -707,7 +707,7 @@ impl FormatSpans {
}
Ok(Event::End(e)) => {
match &e.name().to_ascii_lowercase()[..] {
b"sbr" => {
b"br" | b"sbr" => {
// Skip pop from `format_stack`.
continue;
}