I noticed, that any link that contains "(" or ")" is not clickable. I believe it has to do with regular expressions, but I'm unable to solve this by myself as I'm hopeless in dealling with them.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Title: Links with characters "(" and ")" are not clickable » URL filter fails on URLs containing ( and )
Version: 6.15 » 7.x-dev
mr.baileys’s picture

FileSize
1.15 KB

I tinkered with this for half an hour but was unable to tweak the regex so it accepted parenthesis inside the URL. FWIW, I did write the test case which should pass.

sun’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, url-parenthesis.patch, failed testing.

sun’s picture

Status: Needs work » Postponed
sun’s picture

Status: Postponed » Needs review
FileSize
1.28 KB

According to RFC2396 chapter 2.3. Unreserved Characters, "(" and ")" can be used unescaped, as long as the context allows the characters to appear.

Our context allows it:

# php -r "var_dump(htmlspecialchars('www.parenthesis.com/(session)/index.aspx'));"
string(40) "www.parenthesis.com/(session)/index.aspx"

Status: Needs review » Needs work

The last submitted patch, drupal.filter-url-parenthesis.6.patch, failed testing.

codekarate’s picture

This appears to be a related issue. I noticed that URLS with exclamation points "!" also fail. RFC2396 chapter 2.3. Unreserved Characters states that "!" should also be allowed.

sun’s picture

Title: URL filter fails on URLs containing ( and ) » URL filter fails on RFC2396 Unreserved Characters; e.g.: (, !, and )
Version: 7.x-dev » 8.x-dev
Issue tags: +Needs backport to D7

Let's incorporate that. Needs to be fixed in HEAD first.

Albert Volkman’s picture

Re-roll of @sun's patch for 8.x. Still broken, though.

sun’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, drupal_filter-728380-10.patch, failed testing.

sun’s picture

Title: URL filter fails on RFC2396 Unreserved Characters; e.g.: (, !, and ) » URL filter fails on parenthesis (RFC2396 Unreserved Characters; i.e., ( and ))
Status: Needs work » Needs review
FileSize
1.9 KB

Exclamation marks have been fixed elsewhere already.

Let's see whether attached patch passes the tests.

Status: Needs review » Needs work

The last submitted patch, drupal8.filter-url-parenthesis.13.patch, failed testing.

bobodrone’s picture

Version: 8.x-dev » 7.x-dev
Status: Needs work » Needs review
FileSize
672 bytes

I run into this bug today and have backported the patch for Drupal 7 (without test).
/ BoboDrone

mr.baileys’s picture

Version: 7.x-dev » 8.x-dev

Marked #1868664: "(" or ")" character in text field truncates hyperlink as duplicate.

@bobodrone: thanks for your work on backporting the patch. However, this will need to be fixed in D8 before being backported toD7, so setting version back to D8.

mr.baileys’s picture

Hanno’s picture

Andre-B’s picture

Issue summary: View changes

is this already in D7? when yes, with which version did this patch move in?