From 637a45beb40e40136d5671c92971ce260dd1a204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Thu, 19 Mar 2026 14:39:20 +0100 Subject: [PATCH] Fix id parsing for wiki toolbar now that we use actual html --- lib/open_project/form_tag_helper.rb | 2 +- lib/tabular_form_builder.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/open_project/form_tag_helper.rb b/lib/open_project/form_tag_helper.rb index f45a568c4f1..f49b2ef041a 100644 --- a/lib/open_project/form_tag_helper.rb +++ b/lib/open_project/form_tag_helper.rb @@ -83,7 +83,7 @@ module OpenProject if options[:with_text_formatting] # use either the provided id or fetch the one created by rails - id = options[:id] || output.match(/<[^>]* id="(\w+)"[^>]*>/)[1] + id = options[:id] || output.match(/]* id="(\w+)"[^>]*>/)[1] output << text_formatting_wrapper(id, options) end diff --git a/lib/tabular_form_builder.rb b/lib/tabular_form_builder.rb index 9147756edd6..04e208b3f87 100644 --- a/lib/tabular_form_builder.rb +++ b/lib/tabular_form_builder.rb @@ -63,7 +63,7 @@ class TabularFormBuilder < ActionView::Helpers::FormBuilder ->(input, options) { if options[:with_text_formatting] # use either the provided id or fetch the one created by rails - id = options[:id] || input.match(/<[^>]* id="(\w+)"[^>]*>/)[1] + id = options[:id] || input.match(/]* id="(\w+)"[^>]*>/)[1] options[:preview_context] ||= preview_context(object) input.concat text_formatting_wrapper id, options end