mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 19:10:36 +00:00
Fix issues rebuilding <body> attributes from source b=331894 r=glazou sr=mscott
This commit is contained in:
parent
22bf6dd1e4
commit
00c6a7988b
@ -1824,12 +1824,11 @@ nsHTMLEditor::RebuildDocumentFromSource(const nsAString& aSourceString)
|
||||
if (!FindInReadable(NS_LITERAL_STRING(">"),beginclosebody,endclosebody))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsAutoString bodyTag(Substring(beginbody,endclosebody));//<bodyXXXX >
|
||||
// Truncate at the end of the body tag
|
||||
|
||||
// Kludge of the year: fool the parser by replacing "body" with "div" so we get a node
|
||||
bodyTag.ReplaceSubstring(NS_LITERAL_STRING("body").get(),
|
||||
NS_LITERAL_STRING("div").get());
|
||||
nsAutoString bodyTag;
|
||||
bodyTag.AssignLiteral("<div ");
|
||||
bodyTag.Append(Substring(endbody, endclosebody));
|
||||
|
||||
nsCOMPtr<nsIDOMRange> range;
|
||||
res = selection->GetRangeAt(0, getter_AddRefs(range));
|
||||
|
Loading…
x
Reference in New Issue
Block a user