Skip to content

Commit

Permalink
Only block the single category of C characters that is problematic
Browse files Browse the repository at this point in the history
Co-Authored-By: erasche <hxr@hx42.org>
  • Loading branch information
mvdbeek and hexylena committed Feb 6, 2019
1 parent b59d76e commit dd91709
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/util/__init__.py
Expand Up @@ -1058,7 +1058,7 @@ def smart_str(s, encoding=DEFAULT_ENCODING, strings_only=False, errors='strict')

def strip_control_characters(s):
"""Strip unicode control characters from a string."""
return "".join(c for c in unicodify(s) if unicodedata.category(c)[0] != "C" or unicodedata.category(c) == "Cn")
return "".join(c for c in unicodify(s) if unicodedata.category(c) != "Cc")


def strip_control_characters_nested(item):
Expand Down

0 comments on commit dd91709

Please sign in to comment.