This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Ranch Office and the fly likes how to post a link with parens? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "how to post a link with parens?" Watch "how to post a link with parens?" New topic
Author

how to post a link with parens?

Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

I was trying to post this link as a reply to a question on joins and got the message about containing an illegal character. The suggestion was to escape your < characters. Of which I don't have any.

http://en.wikipedia.org/wiki/Join_ (SQL)

(I inserted a space in the link so it would post here. And yes, the link has parenthesis.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Sadly, you can't. This is most often noticed when trying to post a link to a specific method in the Javadoc APIs, which have parens in the anchors.

Hmmmm. Now that you have asked, though, now we might have to try to do something about it...


[Jess in Action][AskingGoodQuestions]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
This should work now.


"I'm not back." - Bill Harding, Twister
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

http://en.wikipedia.org/wiki/Join_(SQL)

Very nice! Thanks for the improvmement!
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Mine didn't seem to work...

http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Blob.html#setBinaryStream(long)

I can enter it, but when I try the link it takes me to Blob.html and not to the method. I'm using IE7. I'll try it later on Safari.
[ February 02, 2007: Message edited by: Carol Enderlin ]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Hmmm. Well, it works in Firefox and Safari. Those are the two I care about. The rest of you are on your own. No, seriously, it seems that IE doesn't like it when we substitute %28 for '(' and %29 for ')'. The idea here is to block links which attempt to use JavaScript for inappropriate hacks, while allowing innocuous actions like linking to the Java API. Since I don't know JavaScript all that well, I take a very cautious approach about what we should allow. Apparently that's good enough for Geal Browsers™ but not for IE. Well, we'll look into the possibility of further refinements. Meanwhile, everyone else should just switch to Firefox or Safari.
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
http://en.wikipedia.org/wiki/Join_(SQL) works for me with IE 6.0, while
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Blob.html#setBinaryStream(long)

does not.

In other words, the problem exists only for URLs that contain anchors (#).
[ February 02, 2007: Message edited by: Mapraputa Is ]

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
I was a bit terse in my post, I had the same results with IE7 as Map with IE6, where Jeanne's link worked.

Originally posted by Mapraputa Is:

In other words, the problem exists only for URLs that contain anchors (#).

Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Thanks for the info, Carol and Map. Unfortunately I'm not seeing a good solution here that will accommodate IE and still block javascript attaacks. The existing UBB code takes a fairly paranoid attitude about what might be a javascript attack, and not being a javascript expert myself, I'm reluctant to loosen the security too much in that area. I'm open to suggestions, but I'm also reluctant to publicly discuss all the details of how the security works. I suspect that IE users will just have to be content with getting links to the top of the document. At least they can post the link without getting an error now.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

Originally posted by Jim Yingst:
At least they can post the link without getting an error now.

It's a better state of affairs than when we started!
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
And this way we're giving people incentive to upgrade to a real browser.
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Originally posted by Jim Yingst:
And this way we're giving people incentive to upgrade to a real browser.


Good one, Jim.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6657
    
    5

Works for me. Thanks


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to post a link with parens?
 
Similar Threads
joins
JDBC Help figuring it out
equijoin and innerjoin are they same?
INNER JOIN and FULL JION
default join