Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove tags from user profile text. Fixes #38.

  • Loading branch information...
commit 36fef838847393dd0f9c6a6fdcbb3cd84c54bd8f 1 parent 856ce5f
OLD ACCOUNT; SEE http://github.com/Xuzz newsyc authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 Classes/Controllers/ProfileController.m
8 Classes/Controllers/ProfileController.m
View
@@ -13,6 +13,8 @@
#import "SubmissionListController.h"
#import "CommentListController.h"
+#import "NSString+Tags.h"
+
@implementation ProfileController
- (void)dealloc {
@@ -66,9 +68,9 @@ - (NSString *)aboutText {
NSString *about = [(HNUser *) source about];
about = [about stringByReplacingOccurrencesOfString:@"<p>" withString:@"\n\n"];
about = [about stringByReplacingOccurrencesOfString:@"<br>" withString:@"\n"];
- about = [about stringByReplacingOccurrencesOfString:@"<a href='" withString:@""];
- about = [about stringByReplacingOccurrencesOfString:@"'>" withString:@""];
- about = [about stringByReplacingOccurrencesOfString:@"</a>" withString:@""];
+ about = [about stringByReplacingOccurrencesOfString:@"<br />" withString:@"\n"];
+ about = [about stringByReplacingOccurrencesOfString:@"<br/>" withString:@"\n"];
+ about = [about stringByRemovingHTMLTags];
return about;
}
Please sign in to comment.
Something went wrong with that request. Please try again.