Actions
Defect #43801
closedCopy button appears only on the last pre when multiple pre blocks exist
Resolution:
Fixed
Affected version:
Description
Related issues
Updated by Mizuki ISHIKAWA 24 days ago
I think the following changes will resolve the issue.
diff --git a/lib/redmine/wiki_formatting/copypre_scrubber.rb b/lib/redmine/wiki_formatting/copypre_scrubber.rb
index 2afd02823..0157f9921 100644
--- a/lib/redmine/wiki_formatting/copypre_scrubber.rb
+++ b/lib/redmine/wiki_formatting/copypre_scrubber.rb
@@ -27,6 +27,7 @@ module Redmine
button_copy = ApplicationController.helpers.l(:button_copy)
html = '<a class="copy-pre-content-link icon-only" title="' + button_copy + '" data-action="clipboard#copyPre">' + icon + '</a>'
@button ||= Nokogiri::HTML5.fragment(html).children.first
+ @button.deep_dup
end
end
end
Updated by Marius BĂLTEANU 18 days ago
- Related to Patch #42737: Replacing html-pipeline with Loofah for HTML Filtering added
Updated by Marius BĂLTEANU 18 days ago
- Status changed from New to Resolved
- Resolution set to Fixed
Fixed by removing the cached instance variable. In this way, if the user changes his language, the copy button will properly show the updated translation.
Actions