Beispiel #1
0
def cleanCommentData(comment):
	# FIXME bluetext for >>8675309 / >>>/g/7654321 type quotes stays blue until newline;
	#     this affects just posts with body text after >> and >>>
	# FIXME make this take care of [code][/code] and [spoiler][/spoiler] tags
	comment = string.replace(comment, ">>>", TermColor.blue + '>>>')
	comment = string.replace(comment, ">>", TermColor.blue + '>>')
	comment = string.replace(comment, "<br>", '\n' + TermColor.reset)
	comment = string.replace(comment, "&gt;", '>')
	comment = string.replace(comment, "&quot;", '"')
	comment = string.replace(comment, '<span class="quote">', TermColor.green)
	comment = string.replace(comment, '</span>', TermColor.reset)
	comment = stripTags(comment)
	return comment
Beispiel #2
0
def cleanCommentData(comment):
    # FIXME bluetext for >>8675309 / >>>/g/7654321 type quotes stays blue until newline;
    #     this affects just posts with body text after >> and >>>
    # FIXME make this take care of [code][/code] and [spoiler][/spoiler] tags
    comment = string.replace(comment, "&gt;&gt;&gt;", TermColor.blue + '>>>')
    comment = string.replace(comment, "&gt;&gt;", TermColor.blue + '>>')
    comment = string.replace(comment, "<br>", '\n' + TermColor.reset)
    comment = string.replace(comment, "&gt;", '>')
    comment = string.replace(comment, "&quot;", '"')
    comment = string.replace(comment, '<span class="quote">', TermColor.green)
    comment = string.replace(comment, '</span>', TermColor.reset)
    comment = stripTags(comment)
    return comment
Beispiel #3
0
def purifyCommentData(comment):
    comment = string.replace(comment, "<br>", ' ')
    comment = string.replace(comment, "&gt;", '>')
    comment = string.replace(comment, "&quot;", '"')
    comment = stripTags(comment)
    return comment
Beispiel #4
0
def purifyCommentData(comment):
	comment = string.replace(comment, "<br>", ' ')
	comment = string.replace(comment, "&gt;", '>')
	comment = string.replace(comment, "&quot;", '"')
	comment = stripTags(comment)
	return comment