Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 36 by
dragan.g...@gmail.com: HTML reports for category .m files
appear as broken links when served from certain web servers (TeamCity)
http://code.google.com/p/coverstory/issues/detail?id=36
When you run gcov over category Objective-C files (e.g. NSString+Catname.m)
the gcda files produced will have a + sign in their name.
This is fine for most purposes except for hrefs inside the CoverStory
generated HTML files. If I serve these as a TeamCity coverage report
artefact, these hrefs appear as broken links.
URL encoding these hrefs would help immensely. If I've interpreted the code
correctly, the "problematic" line is 1239 in CoverStoryDocument.m. Using
something like
[link stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]
instead of
link
as the second argument to [filesHtml appendFormat: ] should probably do the
trick.
What steps will reproduce the problem?
1. Generate .gcda files for a project that contains .m files with
categories named in the format Class+Category.m
2. Open the files in CoverStory and export it to HTML
3. Resulting HTML files will have href links to this report as <a
href='Class+Category.m.html'>, which will break on some web service since +
will be replaced by a space.
What is the expected output? What do you see instead?
<a href='Class%2BCategory.m.html'> would be safer for most web servers.
What version of the product are you using? On what operating system?
Version 4.3.0 on Mac OS X - 10.7 Lion
Please provide any additional information below.
N/A