Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RTLabelProject/Classes/RTLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ - (void)render
[button setBackgroundColor:[UIColor colorWithWhite:0 alpha:0]];
[button setComponentIndex:linkableComponents.componentIndex];

[button setUrl:[NSURL URLWithString:[linkableComponents.attributes objectForKey:@"href"]]];
NSURL *url = [NSURL URLWithString:[[linkableComponents.attributes objectForKey:@"href"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
[button setUrl:url];
[button addTarget:self action:@selector(onButtonTouchDown:) forControlEvents:UIControlEventTouchDown];
[button addTarget:self action:@selector(onButtonTouchUpOutside:) forControlEvents:UIControlEventTouchUpOutside];
[button addTarget:self action:@selector(onButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
Expand Down