Browse Source

Don't double escape twitter text

Thomas Dy 3 years ago
parent
commit
4587d09dcf
1 changed files with 2 additions and 1 deletions
  1. 2 1
      format.ts

+ 2 - 1
format.ts

@@ -59,7 +59,8 @@ function buildProxyUrl(url: string): string {
 }
 }
 
 
 function formatPlainText(text: string): SafeString {
 function formatPlainText(text: string): SafeString {
-  return new SafeString(escapeHTML(text).toString().replace(/\n/g, "<br />"));
+  // apparently twitter already escapes the text for you
+  return new SafeString(text.replace(/\n/g, "<br />"));
 }
 }
 
 
 class TextFormatter {
 class TextFormatter {