Skip to content

Commit

Permalink
avm2: Use an empty string as the prefix for xmlns=
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpie committed Jun 6, 2024
1 parent 0c50083 commit c1ace7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/avm2/e4x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ impl<'gc> E4XNode<'gc> {
if &*name == b"xmlns" {
namespaces.push(E4XNamespace {
uri: value,
prefix: None,
prefix: Some("".into()),
});
continue;
}
Expand Down Expand Up @@ -1516,7 +1516,7 @@ fn to_xml_string_inner<'gc>(

for ns in &namespace_declarations {
buf.push_utf8(" xmlns");
if let Some(prefix) = ns.prefix {
if let Some(prefix) = ns.prefix.filter(|p| !p.is_empty()) {
buf.push_char(':');
buf.push_str(&prefix);
}
Expand Down

0 comments on commit c1ace7e

Please sign in to comment.