• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Malformed URL string in openURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Malformed URL string in openURL


  • Subject: Re: Malformed URL string in openURL
  • From: James Merkel <email@hidden>
  • Date: Tue, 07 Jun 2011 18:17:15 -0700


On Jun 7, 2011, at 5:39 PM, Jens Alfke wrote:


On Jun 7, 2011, at 4:42 PM, James Merkel wrote:

I am sending a URL string to NSWorkspace's openURL method that has the bracket characters ( ) in it. The URL can't be opened by NSWorkspace. If I take out the ( ) characters NSWorkspace then opens the URL, so I guess NSWorkspace considers the string with ( ) a malformed URL.

That’s weird, since RFC 1738 explicitly says parentheses are legal and don’t need to be escaped:


  Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
  reserved characters used for their reserved purposes may be used
  unencoded within a URL.

Could you show us one of these URLs?

—Jens

The following works ok:

NSString * mapquestURLString;

mapquestURLString = [NSString stringWithString:@"http://mapq.st/?maptype=hybrid&q=39.7452,-104.98916 "];

if([[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:mapquestURLString]]);
else NSLog(@"Could not open mapquest");


But if I use the following string, I get the error message:

mapquestURLString = [NSString stringWithString:@"http://mapq.st/?maptype=hybrid&q=39.7452,-104.98916(Test point label)"];

I got the examples from

http://www.mapquestapi.com/link-to-mapquest/#parameters

I'm noticing some of the other examples don't  work also.

Jim Merkel_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Malformed URL string in openURL
      • From: Jens Alfke <email@hidden>
References: 
 >Malformed URL string in openURL (From: James Merkel <email@hidden>)
 >Re: Malformed URL string in openURL (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Malformed URL string in openURL
  • Next by Date: Re: Malformed URL string in openURL
  • Previous by thread: Re: Malformed URL string in openURL
  • Next by thread: Re: Malformed URL string in openURL
  • Index(es):
    • Date
    • Thread