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
7 changes: 6 additions & 1 deletion KSEncodeURLString.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,16 @@ - (id)transformedValue:(id)value;

NSURL *result = [WebView URLFromPasteboard:pboard];

// Fallback to IFUnicodeURL
// We were falling back to IFUnicodeURL if WebKit was unable to help. However, we found in case
// https://karelia.fogbugz.com/f/cases/252798 this crashes on the string:
// Complete summer class schedule! Fairytale ballet camps for ages 3-5, Intro to Ballet program for ages 5-9, Pre-Intensive for ages 6-
// Why? Who knows!
#if FALLBACK_TO_IFUNICODE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why wrap it in FALLBACK_TO_IFUNICODE? do we really need that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case I have time to go back and figure out how to do it properly sometime.

if (!result && [value isKindOfClass:[NSString class]] && [value length])
{
result = [NSURL URLWithUnicodeString:value];
}
#endif

return result;
}
Expand Down