forked from indymedia/epicyon
Don't trunkate web links
parent
93008d97b1
commit
65227e7c59
|
@ -237,6 +237,10 @@ def removeLongWords(content: str,maxWordLength: int,longWordsList: []) -> str:
|
||||||
for wordStr in longWordsList:
|
for wordStr in longWordsList:
|
||||||
if wordStr.startswith('<'):
|
if wordStr.startswith('<'):
|
||||||
continue
|
continue
|
||||||
|
if wordStr.startswith('http'):
|
||||||
|
continue
|
||||||
|
if '/' in wordStr:
|
||||||
|
continue
|
||||||
if len(wordStr[maxWordLength:])<maxWordLength:
|
if len(wordStr[maxWordLength:])<maxWordLength:
|
||||||
content= \
|
content= \
|
||||||
content.replace(wordStr, \
|
content.replace(wordStr, \
|
||||||
|
|
Loading…
Reference in New Issue