You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff --git a/init.rb b/init.rb
index df6879b..19a1184 100644
--- a/init.rb+++ b/init.rb@@ -14,88 +14,42 @@ Redmine::Plugin.register :redmine_wiki_html_util do
Redmine::WikiFormatting::Macros.register do
desc "Embed raw html\nUsage:\n<pre>{{html\nHTML CODE\n}}</pre>"
macro :html, :parse_args => false do |obj, args, text|
- page = obj.page- raise 'Page not found' if page.nil?-- # For security, only allow insertion on protected (locked) wiki pages- if page.protected- content = text || args- result = "#{ CGI::unescapeHTML(content) }".html_safe- return result- else- return "<!-- Macro removed due to wiki page being unprotected -->"- end- end+ content = text || args+ return "#{ CGI::unescapeHTML(content) }".html_safe+ end
end
Error executing the html macro (undefined method `page' for nil:NilClass)
The text was updated successfully, but these errors were encountered: