jemmy655 / sweetcron

Automatically exported from code.google.com/p/sweetcron
0 stars 0 forks source link

Broken links in Last.fm URLs containing + character #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If a Last.fm URL contains "+" character in the URL, the link in the
sweetcron post and rss feed is broken. See attached screen shot.

Original issue reported on code.google.com by ghostexm...@gmail.com on 29 Aug 2008 at 5:36

Attachments:

GoogleCodeExporter commented 8 years ago
Need to add + to the regex
To fix:
system/application/models/item_model.php

Added \+ to the end group of the regex ( between the ...\-~%... )

Line 111 (function _autolink)
fixed line:

return 
preg_replace('/(?<!\S)((http(s?):\/\/)|(www\.))+([\w.\/&=?\-\+~%;]+)\b/i', '<a
href="http$3://$4$5" rel="external">http$3://$4$5</a>', $text); 

Original comment by mitchell...@gmail.com on 29 Aug 2008 at 7:06

GoogleCodeExporter commented 8 years ago
Thx so much! That fixed it.

Original comment by ghostexm...@gmail.com on 31 Aug 2008 at 5:57