forked from indymedia/epicyon
Remove href
parent
2ad1b51f9a
commit
af10d731a2
|
@ -1191,14 +1191,18 @@ def addEmbeddedAudio(content: str) -> str:
|
|||
for w in words:
|
||||
if extension not in w:
|
||||
continue
|
||||
w=w.replace('href="','')
|
||||
if w.endswith('.'):
|
||||
w=w[:-1]
|
||||
if w.endswith('"'):
|
||||
w=w[:-1]
|
||||
if w.endswith(';'):
|
||||
w=w[:-1]
|
||||
if w.endswith(':'):
|
||||
w=w[:-1]
|
||||
if not w.endswith(extension):
|
||||
continue
|
||||
|
||||
if not (w.startswith('http') or w.startswith('dat:') or '/' in w):
|
||||
continue
|
||||
url=w
|
||||
|
@ -1224,8 +1228,11 @@ def addEmbeddedVideo(content: str,width=400,height=300) -> str:
|
|||
for w in words:
|
||||
if extension not in w:
|
||||
continue
|
||||
w=w.replace('href="','')
|
||||
if w.endswith('.'):
|
||||
w=w[:-1]
|
||||
if w.endswith('"'):
|
||||
w=w[:-1]
|
||||
if w.endswith(';'):
|
||||
w=w[:-1]
|
||||
if w.endswith(':'):
|
||||
|
|
Loading…
Reference in New Issue