mirror of
https://gitlab.com/octtspacc/staticoso
synced 2025-06-05 22:09:23 +02:00
Strip scripts
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
|
||||
from Libs import htmlmin
|
||||
from Libs.bs4 import BeautifulSoup
|
||||
from Modules.HTML import *
|
||||
from Modules.Markdown import *
|
||||
from Modules.Pug import *
|
||||
from Modules.Utils import *
|
||||
@ -403,10 +404,7 @@ def MakeSite(TemplatesText, PartsText, ContextParts, ContextPartsText, ConfMenu,
|
||||
SiteLang=SiteLang,
|
||||
Locale=Locale)
|
||||
if NoScripts:
|
||||
HTML = (HTML
|
||||
).replace('<script>', '<!-- script >'
|
||||
).replace('<script ', '<!-- script '
|
||||
).replace('</script>', '</ script -->')
|
||||
HTML = StripTags(HTML, ['script'])
|
||||
if Minify:
|
||||
HTML = DoMinifyHTML(HTML)
|
||||
WriteFile(PagePath, HTML)
|
||||
|
Reference in New Issue
Block a user