Ticket #480 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Autotagger creates strange tags

Reported by: reporter Owned by: mbonetti
Priority: normal Milestone:
Component: PLUGINS Version:
Severity: normal Keywords:
Cc:

Description

When using the Atom feed of e.g. http://memo.moetry.org/post/atom the tag links are in the form

<a href="http://memo.moetry.org/post/list?tags=ero_anime" rel="tag">ero anime</a>

and the Autotagger creates tags of the form "list?tags=ero_anime". Here is a patch that also cuts the URL at ? and = so the right tag is created in this case.

Change History

Changed 3 years ago by reporter

Since the "attach file" function generates an internal error in Trac, here is the patch:

--- autotagger.php.orig	2007-01-17 13:58:28.000000000 +0100
+++ autotagger.php	2007-06-10 19:50:25.105079123 +0200
@@ -51,7 +51,7 @@
 		if (count($matches)) {
 			foreach($matches[1] as $m) {
 				$sm=array();
-				if(preg_match('#.*href=".*/([^"/]+)/?"#',trim($m),$sm) && count($sm)) {
+				if(preg_match('#.*href=".*[/?=]([^"?=/]+)/?"#',trim($m),$sm) && count($sm)) {
 					$ret[]=  $sm[1];
 				}
 			}

Changed 3 years ago by mbonetti

  • status changed from new to closed
  • resolution set to fixed

This makes sense, thank you for your patch. The updated plugin is in the repository.

Note: See TracTickets for help on using tickets.