Linkify close-parenthesis
Posted: 12 March 2009 02:23 PM   [ Ignore ]
Avatar
RankRankRankRankRank
Total Posts:  3149
Joined  2007-02-26

Observe:

I paste a URL ending with a close-parenthesis…

http://en.wikipedia.org/wiki/Mora_(linguistics)

The close-parenthesis is not linkified.

Obviously I can get around this using the url tags.

Mora

But I thought I should point this out in case this is a problem that can be corrected, rather than just one of those things that must be endured.

Profile
 
 
Posted: 12 March 2009 03:14 PM   [ Ignore ]   [ # 1 ]
Avatar
RankRankRankRank
Total Posts:  1195
Joined  2007-02-14
OP Tipping - 12 March 2009 02:23 PM

Observe:

I paste a URL ending with a close-parenthesis…

http://en.wikipedia.org/wiki/Mora_(linguistics)

The close-parenthesis is not linkified.

Obviously I can get around this using the url tags.

Mora


But I thought I should point this out in case this is a problem that can be corrected, rather than just one of those things that must be endured.

Except this strips both parentheses and gives us:

Wikipedia does not have an article with this exact name

Profile
 
 
Posted: 12 March 2009 03:54 PM   [ Ignore ]   [ # 2 ]
Avatar
RankRankRankRankRank
Total Posts:  2860
Joined  2007-01-31

We’ve seen previously that ExpressionEngine seems to have several built-in URL-wrecking features.  This appears to be one of them.

Profile
 
 
Posted: 12 March 2009 06:18 PM   [ Ignore ]   [ # 3 ]
Avatar
RankRankRankRankRank
Total Posts:  3149
Joined  2007-02-26

Well that is unfortunate.

Profile
 
 
Posted: 13 March 2009 06:21 AM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  4809
Joined  2007-01-03

The parentheses in URLs are not allowed by Expression Engine (although they are allowed by the HTML standard for URLs) because parentheses are an essential part of most scripting languages and EE strips them out to prevent hackers from covertly inserting malicious scripts.

There may be a way to work around it. I’ve tried turning off the “Safe HTML only” feature in the EE Forums module, but it doesn’t seem to have any effect on this issue. I’ll keep looking, although I’m a bit leery about allowing something that could be potentially unsafe.

The real solution is for websites to stop using such characters in their URLs. I don’t think many do. Wikipedia is an exception--prolly because they can’t control what the creator of an entry uses for the URL and they’ve got thousands of people doing so, most probably not aware that this can cause a problem.

Profile
 
 
Posted: 16 March 2009 04:22 PM   [ Ignore ]   [ # 5 ]
Avatar
RankRankRankRankRank
Total Posts:  3149
Joined  2007-02-26

"prolly because they can’t control what the creator of an entry uses for the URL and they’ve got thousands of people doing so, most probably not aware that this can cause a problem”

They do have pretty exacting standards of what can be used as a subject title, and non-compliant titles are repaired. The URL is determined by the subject title.

The use of parentheses to disambiguate is a matter of policy.

http://en.wikipedia.org/wiki/Wikipedia:NCDAB

For disambiguating specific topic pages by using an unambiguous article title, several options are available:

1. When there is another term (such as Pocket billiards instead of Pool) or more complete name (such as Delta rocket instead of Delta) that is equally clear and unambiguous, that should be used.
2. A disambiguating word or phrase can be added in parentheses. The word or phrase in parentheses should be:
* the generic class that includes the topic, as in Mercury (element), Seal (mammal); or
* the subject or context to which the topic applies, as in Union (set theory), Inflation (economics).
3. Rarely, an adjective describing the topic can be used, but it is usually better to rephrase such a title to avoid parentheses.
4. With place-names, if the disambiguating term is a higher-level administrative division, it is often separated using a comma instead of parentheses, as in Windsor, Berkshire. See Wikipedia:Naming conventions (settlements).

EDIT: FWIW (probably not much), I don’t agree that the solution is leave them out of URLs. The HTML standard for URLs is not new: if someone designs software that fails to recognise and interpret a compliant URL as a compliant URL, then they’ve written faulty software. Square brackets and less than/greater than are commonly used for tags in scripting, presumably because parentheses are such a common part of the language.

[ Edited: 16 March 2009 04:40 PM by OP Tipping ]
Profile
 
 
Posted: 17 March 2009 02:25 AM   [ Ignore ]   [ # 6 ]
Avatar
RankRankRankRank
Total Posts:  1195
Joined  2007-02-14

The workaround is to go to the page you get sent to and add the ) in the address window.  Or else you can copy the url, including the ) that EE has stripped and paste it into the address window.

Profile
 
 
   
 
 
‹‹ Spammers      Online tech support help needed ››