Skip to content

Commit

Permalink
Allow single quote (the ' character) in the middle of URL when auto_l…
Browse files Browse the repository at this point in the history
…ink-ing. [#471 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information
chuyeow authored and lifo committed Jun 27, 2008
1 parent a892af6 commit 42612fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/text_helper.rb
Expand Up @@ -464,7 +464,7 @@ def set_cycle(name, cycle_object)
[-\w]+ # subdomain or domain
(?:\.[-\w]+)* # remaining subdomains or domain
(?::\d+)? # port
(?:/(?:(?:[~\w\+@%=\(\)-]|(?:[,.;:][^\s$]))+)?)* # path
(?:/(?:(?:[~\w\+@%=\(\)-]|(?:[,.;:'][^\s$]))+)?)* # path
(?:\?[\w\+@%&=.;-]+)? # query string
(?:\#[\w\-]*)? # trailing anchor
)
Expand Down
1 change: 1 addition & 0 deletions actionpack/test/template/text_helper_test.rb
Expand Up @@ -187,6 +187,7 @@ def test_auto_link_parsing
http://www.mail-archive.com/rails@lists.rubyonrails.org/
http://www.amazon.com/Testing-Equal-Sign-In-Path/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1198861734&sr=8-1
http://en.wikipedia.org/wiki/Sprite_(computer_graphics)
http://en.wikipedia.org/wiki/Texas_hold'em
)

urls.each do |url|
Expand Down

0 comments on commit 42612fe

Please sign in to comment.