Koha-clms/t
Sanjar Tulkinov Anvar o'g'li 4f021a1f1f
Bug 30233: Add Koha::Regex::Replacement to expand replacements as data
Add a small single-pass helper, Koha::Regex::Replacement::expand_template,
that expands a user-supplied regex replacement string as data: numbered
backreferences ($1..$n, ${n}, the legacy \1..\9 form), named captures
($+{name}, ${name}) and the \n \r \t escapes. Every other character is
copied through literally, so \@{...}/${...} interpolation blocks end up as
text rather than being run. This is used to replace the s///ee double-eval.

The routine is fully qualified at the call sites rather than exported, and
case folding is left out to keep it small.

Signed-off-by: Sanjar Tulkinov Anvar o'g'li <sanjarbiy11@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-30 12:15:00 +00:00
..
Acquisition
…
Biblio
…
Budgets
…
Circulation
…
External
…
Koha Bug 30233: Add Koha::Regex::Replacement to expand replacements as data 2026-07-30 12:15:00 +00:00
Number Bug 37511: Unit tests 2024-10-30 11:57:27 +01:00
SIP Bug 40675: Add unit tests for SIP line ending normalization 2025-10-16 11:52:21 +02:00
Search
…
Serials
…
Template Bug 42136: (RMaint follow-up) Fix number of tests 2026-04-27 09:24:16 +02:00
Test Bug 40404: Remove diag from t/Test/Mock/Logger.t 2025-08-01 15:22:48 +02:00
cypress Merge branch '24.11.x-security' into 24.11.x 2026-04-27 09:23:57 +02:00
data Bug 41032: Fix Open Fifth missing in plugin repos config 2025-12-04 14:35:24 +01:00
db_dependent Bug 42866: Prevent SQL injection in Koha::AddtionalContents->search_for_display 2026-07-30 10:27:37 +00:00
edi_testfiles Bug 38423: Add unit tests 2025-04-17 14:30:35 +02:00
etc
…
lib Bug 40765: Prevent acquisition tests to fail if order.quantity = 0 2025-10-16 07:55:14 +02:00
mock_templates/intranet-tmpl/prog Bug 36640: Remove jEditable 2024-11-14 14:19:37 +01:00
00-check-atomic-updates.t
…
00-load.t
…
00-merge-conflict-markers.t
…
00-testcritic.t
…
00-valid-xml.t
…
Auth.t
…
AuthoritiesMarc_MARC21.t
…
AuthoritiesMarc_UNIMARC.t
…
Barcodes_EAN13.t
…
Barcodes_annual.t
…
Barcodes_hbyymmincr.t
…
Barcodes_incremental.t
…
Biblio.t
…
Biblio2.t
…
Budgets.t
…
Charset.t
…
Circulation_barcodedecode.t
…
ClassSortRoutine.t
…
ClassSortRoutine_Dewey.t
…
ClassSortRoutine_Generic.t
…
ClassSortRoutine_LCC.t
…
ClassSource.t
…
Context.t Bug 42360: [24.11] Move separator validation to C4::Context::csv_delimiter 2026-06-18 15:50:38 +02:00
Contract.t
…
CookieManager.t
…
Creators.t
…
DateUtils.t
…
EdiInvoice.t
…
Edifact.t
…
Ediorder.t
…
Ediordrsp.t
…
Form_MessagingPreferences.t Bug 34776: Add unit tests for sub restore_form_values 2025-07-28 10:22:07 +02:00
HtmlTags.t
…
ImportBatch.t Bug 18772: Remove warnings from t/ImportBatch.t 2025-08-01 15:50:08 +02:00
Installer_PerlModules.t
…
ItemCirculationAlertPreference.t
…
Koha_MetadataRecord.t
…
Koha_SearchEngine_Elasticsearch_Browse.t
…
Koha_Template_Plugin_HtmlId.t
…
Koha_Template_Plugin_Koha.t
…
Koha_Util_FrameworkPlugin.t
…
Koha_Util_MARC.t
…
Koha_XSLT_HTTPS.t
…
Labels.t Bug 40388: Remove warning from t/Labels.t 2025-08-01 14:29:57 +02:00
Labels_split_Regex.t
…
Labels_split_ccn.t
…
Labels_split_ddcn.t
…
Labels_split_lccn.t
…
Languages.t Bug 38630: (QA follow-up) Two typos 2025-09-29 09:34:51 +02:00
Logger.t
…
Makefile.t Bug 40527: Add SECURITY.md to ignored list in MakeFile.t 2026-01-09 09:41:06 +01:00
Members_Messaging.t
…
OpenLibrarySearch.t
…
Output.t
…
Output_JSONStream.t
…
Patroncards.t
…
Patroncards_Batch.t
…
Patroncards_Lib.t
…
Patroncards_Patroncard.t
…
Patroncards_Profile.t
…
Patroncards_Template.t
…
RecordProcessor.t Bug 40128: Unit tests 2025-07-31 16:18:10 +02:00
Ris.t
…
SMS.t
…
Scheduler.t
…
Scrubber.t Bug 40079: (follow-up) Improve test coverage and fix undef handling 2025-07-25 16:49:49 +02:00
Search.t
…
Search_PazPar2.t
…
SimpleMARC.t
…
SuggestionEngine.t
…
SuggestionEngine_AuthorityFile.t
…
TmplToken.t
…
Token.t
…
template_filters.t Bug 38872: Add a test 2025-04-22 23:02:08 +02:00
timezones.t
…