Project

General

Profile

Defect #30758 » escape_preview_url.diff

Vincent Robert, 2019-02-06 19:10

View differences:

lib/redmine/wiki_formatting/markdown/helper.rb
22 22
        def wikitoolbar_for(field_id, preview_url = preview_text_path)
23 23
          heads_for_wiki_formatter
24 24
          url = "#{Redmine::Utils.relative_url_root}/help/#{current_language.to_s.downcase}/wiki_syntax_markdown.html"
25
          javascript_tag("var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); wikiToolbar.setHelpLink('#{escape_javascript url}'); wikiToolbar.setPreviewUrl('#{preview_url}'); wikiToolbar.draw();")
25
          javascript_tag("var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); wikiToolbar.setHelpLink('#{escape_javascript url}'); wikiToolbar.setPreviewUrl('#{escape_javascript preview_url}'); wikiToolbar.draw();")
26 26
        end
27 27

  
28 28
        def initial_page_content(page)
lib/redmine/wiki_formatting/textile/helper.rb
23 23
          heads_for_wiki_formatter
24 24
          # Is there a simple way to link to a public resource?
25 25
          url = "#{Redmine::Utils.relative_url_root}/help/#{current_language.to_s.downcase}/wiki_syntax_textile.html"
26
          javascript_tag("var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); wikiToolbar.setHelpLink('#{escape_javascript url}'); wikiToolbar.setPreviewUrl('#{preview_url}'); wikiToolbar.draw();")
26
          javascript_tag("var wikiToolbar = new jsToolBar(document.getElementById('#{field_id}')); wikiToolbar.setHelpLink('#{escape_javascript url}'); wikiToolbar.setPreviewUrl('#{escape_javascript preview_url}'); wikiToolbar.draw();")
27 27
        end
28 28

  
29 29
        def initial_page_content(page)
(1-1/2)