]> granicus.if.org Git - llvm/commitdiff
PR33331 - opt-viewer.py produces broken output for directories with spaces
authorFilipe Cabecinhas <me@filcab.net>
Wed, 7 Jun 2017 14:57:20 +0000 (14:57 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Wed, 7 Jun 2017 14:57:20 +0000 (14:57 +0000)
Fix: Properly quote href attributes.

Patch by Simon Whittaker!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304919 91177308-0d34-0410-b5e6-96231b3b80d8

utils/opt-viewer/optrecord.py

index 3dc77e9db01993f47dc102000bbfa565bcf58cae..2f930a48a056edf01015b8b34dcb5b42403990cd 100644 (file)
@@ -33,7 +33,7 @@ def html_file_name(filename):
     return filename.replace('/', '_') + ".html"
 
 def make_link(File, Line):
-    return "{}#L{}".format(html_file_name(File), Line)
+    return "\"{}#L{}\"".format(html_file_name(File), Line)
 
 
 class Remark(yaml.YAMLObject):