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
In our application we accept HTML template codes in Email templates, when we try to convert them to html using RedCloth, It converts HTML template code open close % symbol to <span> due to this our Email client throws error while processing the if else block. Example: template
<pdir=\"ltr\">{% if some_condition %}</p><ul dir=\"ltr\"><li dir=\"ltr\">Unordered list element1</li></ul><p dir=\"ltr\">{% else %}</p><ul dir=\"ltr\"><li dir=\"ltr\">Unordered list element2</li></ul><p dir=\"ltr\">{% endif %}</p><p dir=\"ltr\"><br></p>
Converting this to html using RedCloth results below content (Else and Endif blocks are converted to <span>)
2.2.5:053 > RedCloth.new(content).to_html=>"<p dir=\"ltr\">{% if some_condition %}</p><ul dir=\"ltr\"><li dir=\"ltr\">Unordered list element1</li><p></ul><p dir=\"ltr\">{% else <span>}</p><ul dir=\"ltr\"><li dir=\"ltr\">Unordered list element2</li></ul><p dir=\"ltr\">{</span> endif %}</p><p dir=\"ltr\"><br></p></p>"
I doubt this might be bug, so raising one here. Can someone please suggest any work around for this issue. Because it is affecting our Email trigger workflow
The text was updated successfully, but these errors were encountered:
Ramesh-Veeriaperumal
changed the title
Erb codes are converted to html
HTML Template Engine codes are converted to html
Feb 18, 2020
In our application we accept HTML template codes in Email templates, when we try to convert them to html using RedCloth, It converts HTML template code open close
%
symbol to<span>
due to this our Email client throws error while processing the if else block. Example: templateConverting this to html using RedCloth results below content (Else and Endif blocks are converted to
<span>
)I doubt this might be bug, so raising one here. Can someone please suggest any work around for this issue. Because it is affecting our Email trigger workflow
The text was updated successfully, but these errors were encountered: