Item references are not clickable in (AO) Loot module lists

Bug #400884 reported by Mireiawen on 2009-07-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BeBot
Low
Thomas Juberg

Bug Description

In Anarchy Online Loot module, items added as references are not clickable in !list and !reroll lists, you can add and remove them but, not see the item stats. Problem seems to be that double quotes (") in itemref links are converted to "

I did quick workaround to remove quotes from itemref links and that seems to be working for me at least; add following to modules/ao/Loot.php, at the start of loot function:
$msg = preg_replace("<a href=\"itemref:(.+)\">", "a href=itemref:$1", $msg);

example: http://pastebin.com/m3985e9d3

Changed in bebot:
importance: Undecided → Low
milestone: none → 0.6.5
status: New → Triaged
Thomas Juberg (thomas-juberg) wrote :

This should now be fixed in both trunk and 0.6 branch. Slated for 0.6.4 release.

Changed in bebot:
assignee: nobody → Thomas Juberg (thomas-juberg)
milestone: 0.6.5 → 0.6.4
status: Triaged → Fix Committed
Changed in bebot:
status: Fix Committed → Fix Released
Mireiawen (mir-mireiawen) wrote :

Problem is still same with 0.6.4 of BeBot.

How to make it:
1) add item to roll: !loot <item>
2) show list: !list
3) try clicking on link

Text blob that is sent to Anarchy Online:
Item Roll List :: <a href="text://Slot <font color=#FFFF00>#1</font>: (<a href='chatcmd:///tell Bot !add 1'>Add</a>/<a href='chatcmd:///tell Bot !rem 1'>Remove</a>)
Item: <font color=#FFFF00><a href=&quot;itemref://206013/206013/1&quot;>Might of the Revenant</a></font> (<font color=#FFFF00>1x</font>)

Thomas Juberg (thomas-juberg) wrote :

Apologies.
This was not properly tested prior to release.

Changed in bebot:
milestone: 0.6.4 → 0.6.5
status: Fix Released → Confirmed
Thomas Juberg (thomas-juberg) wrote :

Please test the following replacement function in main/14_Tools.php

It should fix issues with !loot/!list

It does need more testing however to ensure it does not break anything else.

 function make_blob($title, $content)
 {
  $content = str_replace("=\"", "='", $content);
  $content = str_replace("\">", "'>", $content);
  $content = str_replace("\"", "&quot;", $content);

  return "<a href=\"text://" . $content . "\">" . $title . "</a>";
 }

Changed in bebot:
status: Confirmed → Fix Committed
Changed in bebot:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers