<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - opt-viewer.py produces broken output for directories with spaces"
href="https://bugs.llvm.org/show_bug.cgi?id=33331">33331</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>opt-viewer.py produces broken output for directories with spaces
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>opt-viewer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>simon.f.whittaker@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>anemet@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18583" name="attach_18583" title="Patch fixing the href">attachment 18583</a> <a href="attachment.cgi?id=18583&action=edit" title="Patch fixing the href">[details]</a></span>
Patch fixing the href
Hello,
as in the title, opt-viewer.py output produces broken links for input filename
which have spaces in their path.
e.g.
<tr>
<td class="column-entry-0"><a href=C:\Program Files
(x86)\SCE\foo.h.html#L846>C:\Program Files (x86)\SCE\foo.h:846:0</a></td>
I think the easiest fix is to modify optrecord.py to put quotes around the
href:
def make_link(File, Line):
- return "{}#L{}".format(html_file_name(File), Line)
+ return "\"{}#L{}\"".format(html_file_name(File), Line)
Full patch attached.
Thanks,
Simon</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>