##// END OF EJS Templates
Strip {{toc}} tags in pdf exports (#9842)....
Jean-Philippe Lang -
r10997:d0888b2f7199
parent child
Show More
@@ -112,6 +112,13 module Redmine
112 112 RDMPdfEncoding::rdm_from_utf8(txt, l(:general_pdf_encoding))
113 113 end
114 114
115 def formatted_text(text)
116 html = Redmine::WikiFormatting.to_html(Setting.text_formatting, text)
117 # Strip {{toc}} tags
118 html.gsub!(/<p>\{\{([<>]?)toc\}\}<\/p>/i, '')
119 html
120 end
121
115 122 # Encodes an UTF-8 string to UTF-16BE
116 123 def to_utf16(str)
117 124 if str.respond_to?(:encode)
@@ -132,8 +139,7 module Redmine
132 139 def RDMwriteHTMLCell(w, h, x, y, txt='', attachments=[], border=0, ln=1, fill=0)
133 140 @attachments = attachments
134 141 writeHTMLCell(w, h, x, y,
135 fix_text_encoding(
136 Redmine::WikiFormatting.to_html(Setting.text_formatting, txt)),
142 fix_text_encoding(formatted_text(txt)),
137 143 border, ln, fill)
138 144 end
139 145
General Comments 0
You need to be logged in to leave comments. Login now