1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 08:04:49 +01:00

rewrite: _resolve_text_type() between html and js/css actually selects correct type if no html tag detected!

This commit is contained in:
Ilya Kreymer 2017-07-19 21:07:27 -07:00
parent 35674c6de7
commit b2c635ac79

View File

@ -310,9 +310,9 @@ class RewriteInfo(object):
buff = self.read_and_keep(128)
# check if starts with a tag, then likely html
if self.TAG_REGEX.match(buff):
self.text_type = 'html'
# check if doesn't start with a tag, then likely not html
if not self.TAG_REGEX.match(buff):
self.text_type = 'js' if mod == 'js_' else 'css'
@property
def content_stream(self):