Revision history [back]
Still invastigating but I think that problem appears because a regular expression in question.py is not valid. Please have a look
def get_summary_html(self, search_state):
html = self.get_cached_summary_html()
if not html:
html = self.update_summary_html()
# use `<<<` and `>>>` because they cannot be confused with user input
# - if user accidentialy types <<<tag-name>>> into question title or body,
# then in html it'll become escaped like this: <<<tag-name>>>
regex = re.compile(r'<<<(%s)>>>' % const.TAG_REGEX_BARE)
while True:
match = regex.search(html)
if not match:
break
seq = match.group(0) # e.g "<<<my-tag>>>"
tag = match.group(1) # e.g "my-tag"
full_url = search_state.add_tag(tag).full_url()
html = html.replace(seq, full_url)
return html
Since my tags are not in english, but in greek, there is a chance that my url already contains different strange symbols. Thus, regex may is confused and dont remove these <<< >>> characters
Still invastigating but I think that problem appears because a regular expression in question.py is not valid. Please Plese have a look
def get_summary_html(self, search_state):
html = self.get_cached_summary_html()
if not html:
html = self.update_summary_html()
# use `<<<` and `>>>` because they cannot be confused with user input
# - if user accidentialy types <<<tag-name>>> into question title or body,
# then in html it'll become escaped like this: <<<tag-name>>>
regex = re.compile(r'<<<(%s)>>>' % const.TAG_REGEX_BARE)
while True:
match = regex.search(html)
if not match:
break
seq = match.group(0) # e.g "<<<my-tag>>>"
tag = match.group(1) # e.g "my-tag"
full_url = search_state.add_tag(tag).full_url()
html = html.replace(seq, full_url)
return html
Since my tags are not in english, but in greek, there is a chance that my url already contains different strange symbols. Thus, regex may is confused and dont remove these <<< >>> characters
Still invastigating but I think that problem appears because a regular expression in question.py is not valid. Plese have a look
def get_summary_html(self, search_state):
html = self.get_cached_summary_html()
if not html:
html = self.update_summary_html()
# use `<<<` and `>>>` because they cannot be confused with user input
# - if user accidentialy types <<<tag-name>>> into question title or body,
# then in html it'll become escaped like this: <<<tag-name>>>
regex = re.compile(r'<<<(%s)>>>' % const.TAG_REGEX_BARE)
while True:
match = regex.search(html)
if not match:
break
seq = match.group(0) # e.g "<<<my-tag>>>"
tag = match.group(1) # e.g "my-tag"
full_url = search_state.add_tag(tag).full_url()
html = html.replace(seq, full_url)
return html
Since my tags are not in english, but in greek, there is a chance that my url already contains different strange symbols.
Thus, < symbols etc, so, regex may is confused and dont remove these <<< >>> characters
Still invastigating but I think that problem appears is because a regular expression in question.py is not valid. Plese have a look
def get_summary_html(self, search_state):
html = self.get_cached_summary_html()
if not html:
html = self.update_summary_html()
# use `<<<` and `>>>` because they cannot be confused with user input
# - if user accidentialy types <<<tag-name>>> into question title or body,
# then in html it'll become escaped like this: <<<tag-name>>>
regex = re.compile(r'<<<(%s)>>>' % const.TAG_REGEX_BARE)
while True:
match = regex.search(html)
if not match:
break
seq = match.group(0) # e.g "<<<my-tag>>>"
tag = match.group(1) # e.g "my-tag"
full_url = search_state.add_tag(tag).full_url()
html = html.replace(seq, full_url)
return html
Since my tags are not in english, but in greek, there is a chance that my url already contains < symbols etc, so, regex may is confused and dont remove these <<< >>> characters