HTML links in comments

Creating and modifying plugins.
Post Reply
ned
Regular
Posts: 50
Joined: Fri May 07, 2004 4:11 pm

HTML links in comments

Post by ned »

Hi,

I want to display HTML code/tags in comments. I was getting around fine using the bbcode plugin, but since upgrading to the final 0.8 s9y version, the BB link code stopped working.

I also downloaded and installed the "Transforms HTML for comments" plugin, version 1.3. I moved it to the top of my event list as requested. HTML still does not work. The plugin does not appear to do anything.


Keywords: URL, URLs in comments, hypertext
ned
Regular
Posts: 50
Joined: Fri May 07, 2004 4:11 pm

Post by ned »

I'm sorry. Upon further investigation, the bbcode urls are working. There is just something s9y doesn't like about this particular one:

Code: Select all

[url=http://www.campusmagazine.org/articledetail.aspx?id=4ff8775f-04a8-45c7-b61c-e6a8f9f157a5]2005 Campus Outrage Awards[/url]
It displays just as shown. I guess it does not like some of the special characters. This is unfortunate.

I still do not know what the other HTML markup plugin is doing. Thanks.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Ned!

Thanks for noticing, this was indeed a bug in the BBCode plugin. I just committed a patch to our SVN repository.

You can easily patch your serendipity_event_bbcode.php file by replacing

Code: Select all

$pattern_url   = '([@\?:&;0-9a-z#\.\-_\/]+?)';
with

Code: Select all

$pattern_url   = '([@!=~\?:&;0-9a-z#\.\-_\/]+?)';
at about line 77 of the bbcode plugin. Note the addition of the "!=~" characters.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply