From 4484c82b1becc2fe5ab7b6842b3419b16c523445 Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Wed, 28 Jun 2017 01:47:51 -0400
Subject: PLT-6799 Removed <wbr> tags from markdown links (#6766)

* PLT-6799 Removed <wbr> tags from markdown links

* Fixed unit tests
---
 webapp/utils/text_formatting.jsx | 12 ------------
 1 file changed, 12 deletions(-)

(limited to 'webapp/utils/text_formatting.jsx')

diff --git a/webapp/utils/text_formatting.jsx b/webapp/utils/text_formatting.jsx
index 5cae81f4e..33cc3242c 100644
--- a/webapp/utils/text_formatting.jsx
+++ b/webapp/utils/text_formatting.jsx
@@ -53,11 +53,6 @@ export function formatText(text, inputOptions) {
         output = replaceNewlines(output);
     }
 
-    // Add <wbr /> tags to recommend line breaking on slashes within URLs
-    if (!options.singleline) {
-        output = insertLongLinkWbr(output);
-    }
-
     return output;
 }
 
@@ -477,10 +472,3 @@ export function replaceTokens(text, tokens) {
 function replaceNewlines(text) {
     return text.replace(/\n/g, ' ');
 }
-
-//replace all "/" inside <a> tags to "/<wbr />"
-function insertLongLinkWbr(test) {
-    return test.replace(/\//g, (match, position, string) => {
-        return match + ((/a[^>]*>[^<]*$/).test(string.substr(0, position)) ? '<wbr />' : '');
-    });
-}
-- 
cgit v1.2.3-1-g7c22

