[ZBX-21898] Add escaping of backslashes in history function parameters. Created: 2022 Nov 09  Updated: 2025 Jan 13  Resolved: 2024 Jan 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F), Server (S)
Affects Version/s: 6.4.0beta3
Fix Version/s: 6.4.11rc1, 7.0.0alpha9, 7.0 (plan)

Type: Problem report Priority: Blocker
Reporter: Konstantins Prutkovs (Inactive) Assignee: Konstantins Prutkovs (Inactive)
Resolution: Fixed Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File latest-data.png     PNG File problem.png     PNG File trigger.png    
Issue Links:
Causes
causes ZBX-25265 "regsub" macro function duplicates fo... Closed
causes ZBX-25860 Zabbix upgrade from 6.4.15 to 7.0.8 p... Closed
causes ZBX-23617 Test item cannot find macro if specif... Closed
Duplicate
is duplicated by ZBX-21856 trigger / calculated expression regex... Closed
is duplicated by ZBX-21998 Zabbix 6 regexp: incorrect expression... Closed
Sub-task
depends on ZBX-23318 front-end allows to enter unescaped s... Closed
part of ZBX-22149 Trigger upgrade issue Closed
Team: Team C
Sprint: Sprint 95 (Dec 2022), Sprint 96 (Jan 2023), Sprint 97 (Feb 2023), Sprint 98 (Mar 2023), Sprint 99 (Apr 2023), Sprint 100 (May 2023), Sprint 101 (Jun 2023), Sprint 102 (Jul 2023), Sprint 103 (Aug 2023), Sprint 104 (Sep 2023), Sprint 105 (Oct 2023), Sprint 106 (Nov 2023), Sprint 107 (Dec 2023), S2401
Story Points: 2

 Description   

As initially reported issue in ZBX-21009 has evolved, it turned out that adding backslash escaping to the function parameters of history functions would break:

  • triggers that have backslashes in history functions parameters
  • calculated items that have backslashes in history functions parameters

As such it was decided to roll back changes made in ZBX-21536 and /ZBX-21534 on all branches except on master.

It was decided, going forward, that Zabbix should have proper backslash escaping in parameters of history functions.



 Comments   
Comment by Alexey Asemov [ 2023 Feb 12 ]

Seems like this is yet and still unresolved.

This is pretty much critical for anyone using regexps in LLD triggers. Is there any known workaround atm?

Comment by Elina Pulke [ 2023 Apr 27 ]

Fixed in development branches:

Comment by Konstantins Prutkovs (Inactive) [ 2023 Sep 07 ]

Available in versions:

Comment by hubiao [ 2024 Jan 03 ]

what?

Comment by Martins Valkovskis [ 2024 Jan 09 ]

Updated documentation:

  • Escaping examples: 6.0, 6.4, 7.0 (new page)
Generated at Thu Apr 03 09:54:36 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.