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