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
With some emails, when a style tag is present (ex : <style type="text/css">) the function processStyleTags(html)
would NOT catch and keep the end tag </style> in a group, and then would catch a position number and would replace the end tag </style> with the location number, thus breaking the HTML syntax, thus implying a blank body in the generated PDF.
This is the original regex , with the wrongfully "NO CATCH" instruction :
This is the one modified to DO CATCH the ending tag </style> so it's correctly stored in the "end" variable and then correctly put back at the end : (without the non capturing "?:" :
With some emails, when a style tag is present (ex : <style type="text/css">) the function processStyleTags(html)
would NOT catch and keep the end tag </style> in a group, and then would catch a position number and would replace the end tag </style> with the location number, thus breaking the HTML syntax, thus implying a blank body in the generated PDF.
This is the original regex , with the wrongfully "NO CATCH" instruction :
return html.replace(/(<style[^>]*>)(.*?)(?:<\/style>)/gi, function(m, tag, style, end) {
This is the one modified to DO CATCH the ending tag </style> so it's correctly stored in the "end" variable and then correctly put back at the end : (without the non capturing "?:" :
return html.replace(/(<style[^>]*>)(.*?)(<\/style>)/gi, function(m, tag, style, end) {
Now for me it does generate the PDF correctly for emails with <style> tag.
The text was updated successfully, but these errors were encountered: