Explorar o código

Don't double escape twitter text

Thomas Dy %!s(int64=3) %!d(string=hai) anos
pai
achega
4587d09dcf
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      format.ts

+ 2 - 1
format.ts

@@ -59,7 +59,8 @@ function buildProxyUrl(url: string): string {
 }
 
 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 {