Browse files

Fixed escaping for documentation set when dealing with <> signs. Closes


This covers issues like `Some text <UnknownEntity> and more`. Note that this simply deletes all occurrences of < and > markers. Although this prevents docsetutil from complaining when indexing, it can result in undesired removal of the markers in formulas or similar.

Also note that current implementation would effectively make `<UnknownEntity>` invisible inside HTML. Although the string is emitted properly, HTML considers it unknown tag and doesn't render it! Although it could be possible overriding this by converting <> to `&ls;` and `&gt;`, this would prevent usage of any custom HTML formatting, like `<tt>something</tt>`.
  • Loading branch information...
1 parent e8572cb commit b1a8bd069ba8296effcf0ea52f377c01c2325f2c @tomaz committed May 11, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 Application/GBApplicationSettingsProvider.m
@@ -239,6 +239,10 @@ - (NSString *)stringByConvertingMarkdownToText:(NSString *)markdown {
return capturedStrings[2];
+ // Remove escaped HTML entitites or docsetutil will complain.
+ result = [result stringByReplacingOccurrencesOfString:@"<" withString:@""];
+ result = [result stringByReplacingOccurrencesOfString:@">" withString:@""];
// Remove embedded prefix/suffix.
result = [result stringByReplacingOccurrencesOfString:self.commentComponents.codeSpanStartMarker withString:@""];
result = [result stringByReplacingOccurrencesOfString:self.commentComponents.codeSpanEndMarker withString:@""];

0 comments on commit b1a8bd0

Please sign in to comment.