Smarter, smart tagging (allow skipping certain html tags)

alienbrain - March 24, 2009 - 21:54
Project:Delicious
Version:HEAD
Component:Code
Category:bug report
Priority:critical
Assigned:paulbooker
Status:needs review
Description

The smart tagging functionality scans nodes for corresponding delicious tags, and add links to delicious next to matches it found.

One thing it currently doesn't take care of though, if the node contains code (e.g. using the <code> tag). Smart tagging would clatter the code in this case if a delicious tag happens to be matched to this code.

A patch is attached which adds the ability to skip certain HTML tags from smart tagging processing code. It also exposes such an option in the module settings so users can customize it as they wish.

AttachmentSize
delicious_skip_tags.patch7.65 KB

#1

alienbrain - March 24, 2009 - 23:11
Priority:normal» critical

I've had this patch on my personal blog for a while, and now I've come to realize that it also fixes a very important issue which is why I feel inclined to pump this to critical.

If the node body contains something like <a href="#">a link which also contains delicious tag</a>, the tag gets replaced with a link, so we end up with 2 nested <a> elements.

Attached a patch same as before with few changes including having the <a> as one of the default html tags to skip while applying the smart tagging.

AttachmentSize
delicious-412692.patch 7.43 KB

#2

paulbooker - March 25, 2009 - 16:55
Assigned to:Anonymous» paulbooker
 
 

Drupal is a registered trademark of Dries Buytaert.