Created
October 26, 2025 13:03
-
-
Save Gro-Tsen/53d9bf4c026c9ea1268cbcdf79fde311 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -r 62b30a28e7a4 dom/serializers/nsPlainTextSerializer.cpp | |
| --- a/dom/serializers/nsPlainTextSerializer.cpp Mon Sep 08 11:49:04 2025 -0400 | |
| +++ b/dom/serializers/nsPlainTextSerializer.cpp Thu Oct 23 16:09:22 2025 +0200 | |
| @@ -108,11 +108,6 @@ | |
| void nsPlainTextSerializer::CurrentLine::MaybeReplaceNbspsInContent( | |
| const int32_t aFlags) { | |
| - if (!(aFlags & nsIDocumentEncoder::OutputPersistNBSP)) { | |
| - // First, replace all nbsp characters with spaces, | |
| - // which the unicode encoder won't do for us. | |
| - mContent.ReplaceChar(kNBSP, kSPACE); | |
| - } | |
| } | |
| void nsPlainTextSerializer::CurrentLine::ResetContentAndIndentationHeader() { | |
| @@ -1435,18 +1430,6 @@ | |
| } | |
| static void ReplaceVisiblyTrailingNbsps(nsAString& aString) { | |
| - const int32_t totLen = aString.Length(); | |
| - for (int32_t i = totLen - 1; i >= 0; i--) { | |
| - char16_t c = aString[i]; | |
| - if (IsLineFeedCarriageReturnBlankOrTab(c)) { | |
| - continue; | |
| - } | |
| - if (kNBSP == c) { | |
| - aString.Replace(i, 1, ' '); | |
| - } else { | |
| - break; | |
| - } | |
| - } | |
| } | |
| void nsPlainTextSerializer::ConvertToLinesAndOutput(const nsAString& aString) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment