diff --git a/components/gfx/platform/freetype/android/font_list.rs b/components/gfx/platform/freetype/android/font_list.rs index 97276c35468..6e6b45c5ad7 100644 --- a/components/gfx/platform/freetype/android/font_list.rs +++ b/components/gfx/platform/freetype/android/font_list.rs @@ -429,7 +429,7 @@ impl FontList { fn text_content(nodes: &[Node]) -> Option { nodes.get(0).and_then(|child| match child { - Node::Text(contents) => Some(contents.clone()), + Node::Text(contents) => Some(contents.trim().into()), Node::Element { .. } => None, }) }