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:
parent
60c2a14363
commit
855bc721a8
|
@ -585,7 +585,7 @@ impl FormatSpans {
|
||||||
};
|
};
|
||||||
let mut format = format_stack.last().unwrap().clone();
|
let mut format = format_stack.last().unwrap().clone();
|
||||||
match &e.name().to_ascii_lowercase()[..] {
|
match &e.name().to_ascii_lowercase()[..] {
|
||||||
b"sbr" => {
|
b"br" | b"sbr" => {
|
||||||
text.push('\n');
|
text.push('\n');
|
||||||
if let Some(span) = spans.last_mut() {
|
if let Some(span) = spans.last_mut() {
|
||||||
span.span_length += 1;
|
span.span_length += 1;
|
||||||
|
@ -707,7 +707,7 @@ impl FormatSpans {
|
||||||
}
|
}
|
||||||
Ok(Event::End(e)) => {
|
Ok(Event::End(e)) => {
|
||||||
match &e.name().to_ascii_lowercase()[..] {
|
match &e.name().to_ascii_lowercase()[..] {
|
||||||
b"sbr" => {
|
b"br" | b"sbr" => {
|
||||||
// Skip pop from `format_stack`.
|
// Skip pop from `format_stack`.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue