Issue 36 in coverstory: HTML reports for category .m files appear as broken links when served from certain web servers (TeamCity)

12 views
Skip to first unread message

cover...@googlecode.com

unread,
Aug 7, 2012, 11:18:07 AM8/7/12
to coverstor...@googlegroups.com
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

cover...@googlecode.com

unread,
Aug 7, 2012, 10:49:09 PM8/7/12
to coverstor...@googlegroups.com
Updates:
Status: Fixed

Comment #1 on issue 36 by thoma...@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

I think this is fixed this problem and the other spot it probably was
happening in.

cover...@googlecode.com

unread,
Aug 8, 2012, 1:09:33 AM8/8/12
to coverstor...@googlegroups.com

Comment #2 on 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

Sweet, thanks for this :-D

Reply all
Reply to author
Forward
0 new messages