#82 ✓resolved
Greg Moreno

Handle links containing parentheses

Reported by Greg Moreno | November 3rd, 2008 @ 05:35 PM | in 4.1.9

in: "textile":http://www.domain.com/123-alpha_3_(wiki)

result: <p><a href="http://www.domain.com/123-alpha_3_(wiki">textile</a>)</p>

Please note there is a parenthesis after 'wiki' in the input but it gets removed from the URL in the result.

Comments and changes to this ticket

  • Greg Moreno

    Greg Moreno November 5th, 2008 @ 08:08 PM

    Nevermind. RedCloth doc says that link should be surrounded by brackets in cases like this.

  • Jason Garber

    Jason Garber January 20th, 2009 @ 04:52 PM

    • Milestone set to 4.1.9
    • State changed from “new” to “open”
    • Title changed from “Rendering error for link with parenthesis” to “Handle containing parentheses”

    Glad you figured it out, Greg. Your case adds weight to Ryan Alyea's assertion:

    Is there a better way to support parenthesis in links like Wikipedia links? Requiring brackets around the link is confusing to many new users who don't understand why their Wikipedia links won't work. I wrote a patch on the latest version of RedCloth to support this a lot better. Instead of stopping on a end parenthesis, it instead looks at the URL itself. If the number of opening and closing parenthesis are equal, it allows the end parenthesis in the link. I'm sure there's a better way, like checking if they are properly nested.

    Best of all, he included a patch! Hopefully it'll work out and you won't have to use brackets.

  • Jason Garber
  • Jason Garber

    Jason Garber January 20th, 2009 @ 04:55 PM

    • Title changed from “Handle containing parentheses” to “Handle links containing parentheses”
  • Jason Garber

    Jason Garber January 21st, 2009 @ 05:04 PM

    • State changed from “open” to “resolved”

    (from [9d57475caaddf23decebc6ddb3fe5625e6db5f71]) Handle links containing parentheses. Brackets are no longer required. [#82 state:resolved] http://github.com/jgarber/redclo...

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

RedCloth is a Ruby library for converting Textile into HTML

Shared Ticket Bins

People watching this ticket


Referenced by