|
|
@ -511,6 +511,10 @@ async def handle_pad(args, padid, data, info, session): |
|
|
|
html = html["data"]["html"] |
|
|
|
ver["path"] = p + ".magicwords.html" |
|
|
|
ver["url"] = quote(ver["path"]) |
|
|
|
for magic_word in magic_words: |
|
|
|
replace_word = "<span class='highlight'>"+magic_word+"</span>" |
|
|
|
if magic_word in html: |
|
|
|
html = html.replace(magic_word,replace_word) |
|
|
|
doc = html5lib.parse( |
|
|
|
html, treebuilder="etree", namespaceHTMLElements=False |
|
|
|
) |
|
|
|