sylvanaar / prat-3-0

Prat-3.0 is a chat enhancement addon for world of warcraft
https://www.curseforge.com/wow/addons/prat-3-0
GNU General Public License v3.0
25 stars 45 forks source link

Message with link containing "%" throw lua error #210

Open Slivo-fr opened 3 years ago

Slivo-fr commented 3 years ago

Describe the bug A message with a link that contains "%" char throw an error and is not displayed

To Reproduce Steps to reproduce the behavior:

  1. Type https://discord.gg/EQMK3nhaTT%7Brt5%7D in a chat
  2. See the lua error

Expected behavior Message should show up properly with the link

Lua error

7x Prat-3.0-3.9.1\services\patterns.lua:234: invalid capture index
[C]: in function `gsub'
Prat-3.0-3.9.1\services\patterns.lua:234: in function `ReplaceMatches'
Prat-3.0-3.9.1\addon\addon.lua:702: in function <Prat-3.0\addon\addon.lua:613>
(tail call): ?
FrameXML\ChatFrame.lua:2797: in function `ChatFrame_OnEvent'
[string "*:OnEvent"]:1: in function <[string "*:OnEvent"]:1>

Locals:
(*temporary) = "Plus d'infos & candidature sur : @##1##@"
(*temporary) = "@##1##@"
(*temporary) = "|cff149bfd|Hurl:https://discord.gg/EQMK3nhaTT%7Brt5%7D|h[https://discord.gg/EQMK3nhaTT%7Brt5%7D]|h|r"

Version Information (please complete the following information):

Addons you are running Many, can provide the list if needed