Merge "FIxed py38 tests"
This commit is contained in:
commit
8e85f8706d
@ -14,9 +14,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
import calendar
|
||||
import cgi
|
||||
import datetime
|
||||
import gzip
|
||||
import html
|
||||
import random
|
||||
import re
|
||||
import time
|
||||
@ -248,7 +248,10 @@ def unwrap_text(text):
|
||||
|
||||
|
||||
def format_text(s):
|
||||
s = cgi.escape(re.sub(re.compile('\n{2,}', flags=re.MULTILINE), '\n', s))
|
||||
# TODO(snikitin) Maybe we need to remove 'False' from escape()
|
||||
# to escape ' and " symbols?
|
||||
s = html.escape(re.sub(re.compile('\n{2,}', flags=re.MULTILINE), '\n', s),
|
||||
False)
|
||||
|
||||
def replace_dots(match_obj):
|
||||
return re.sub(r'([\./]+)', r'\1​', match_obj.group(0))
|
||||
|
Loading…
Reference in New Issue
Block a user