mirror of
https://github.com/clearml/clearml
synced 2025-03-03 18:52:12 +00:00
Fix \r
and \n
in debug samples title/series (issue #323)
This commit is contained in:
parent
fa77d0f380
commit
9b962bae4b
@ -209,8 +209,8 @@ class UploadEvent(MetricsEventAdapter):
|
||||
def _replace_slash(part):
|
||||
# replace the three quote symbols we cannot have,
|
||||
# notice % will be converted to %25 when the link is quoted, so we should not use it
|
||||
# Replace quote safe characters: ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","
|
||||
return reduce(lambda a, b: a.replace(b, "0x{:02x}".format(ord(b))), "#\"\';?:@&=+$,%!",
|
||||
# Replace quote safe characters: ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," | "\n" | "\r"
|
||||
return reduce(lambda a, b: a.replace(b, "0x{:02x}".format(ord(b))), "#\"\';?:@&=+$,%!\r\n",
|
||||
part.replace('\\', '/').strip('/').replace('/', '.slash.'))
|
||||
|
||||
def __init__(self, metric, variant, image_data, local_image_path=None, iter=0, upload_uri=None,
|
||||
|
Loading…
Reference in New Issue
Block a user