summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-06-28 01:47:51 -0400
committerSaturnino Abril <saturnino.abril@gmail.com>2017-06-28 13:47:51 +0800
commit4484c82b1becc2fe5ab7b6842b3419b16c523445 (patch)
tree33258c309c3a5a558a3c81fec33e7132dac377e1 /webapp/utils
parent99fc4b0988e941242732feff428468c6df69fe50 (diff)
downloadchat-4484c82b1becc2fe5ab7b6842b3419b16c523445.tar.gz
chat-4484c82b1becc2fe5ab7b6842b3419b16c523445.tar.bz2
chat-4484c82b1becc2fe5ab7b6842b3419b16c523445.zip
PLT-6799 Removed <wbr> tags from markdown links (#6766)
* PLT-6799 Removed <wbr> tags from markdown links * Fixed unit tests
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/text_formatting.jsx12
1 files changed, 0 insertions, 12 deletions
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 />' : '');
- });
-}