Answers.Body: <p>The styling needs to be wrapped in <code>{literal}...{/literal}</code> in the message template.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-20T09:18:34.410Z
Answers.Text: See also this related answer https://civicrm.stackexchange.com/questions/17643/scheduled-reminders-email-head-css-attributes-are-being-stripped-out
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-29T12:52:21.673Z
Answers.LastActivityDate: 2019-08-29T12:52:21.673Z
Answers.UserDisplayName: Demerit
Body: <p>I have this issue I don't understand with a civirule that should be sending an email with a .pdf attached when adding a member to a group but it's blocked by Smarty during the process of merging the fields and creating the pdf file.</p>
  
  <p>If I look at Drupal's log, I can identify these User error. I checked the html code with the W3C validator and there's nothing special at it.</p>
  
  <p>They are all related to the style but I don't know how and if can improve anything except using inline style but it's a pdf not an email.</p>
  
  <p>I tried with CKEditor turned off and it changed nothing.</p>
  
  <p>Here are some examples:</p>
  
  <pre><code>User error : Smarty error: [in string:&lt;meta content="text/html; charset=utf-8" http-equiv="content-type" /&gt; &lt;title&gt;&lt;/title&gt; &lt;style&gt;@page { size: 21cm 29.7cm; margin-left: 1.5cm; margin-right: 1.5cm; margin-top: 1.5cm; margin-bottom: 1.1cm } p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 115%; orphans: 2; widows: 2; background: transparent } p.western { font-family: "Times New Roman", serif; font-size: 10pt; } h1 { margin-bottom: 0.11cm; direction: ltr; color: #000000; orphans: 2; widows: 2; background: transparent; page-break-after: avoid } h1.western { font-family: "Arial", sans-serif; font-size: 14pt; font-weight: bold } a:link { color: #000080; text-decoration: underline } a:visited { color: #800000; text-decoration: underline } &lt;/style&gt; &lt;table align="center" border="0" cellpadding="0" cellspacing="0" class="background" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; width: 100%;" width="100%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="center" bgcolor="#FFFFFF" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;" valign="top"&gt; &lt;table align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" class="wrapper" style="outline: none;border-collapse: collapse; border-spacing: 0; padding: 0; width: inherit;" width="100%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="center" style="padding: 0px 0px 0px 0px;border-collapse: collapse; border-spacing: 0; margin: 0;" valign="top"&gt;&lt;!-- Header Logos --&gt; &lt;div style="padding-bottom:130px"&gt;&lt;img alt="logo_SNPMNS" id="logo_SNPMNS" src="https://media.all-in-group.fr/SNPMNS/gestad/Logox2.png" style="border-width: 0px; border-style: none; float: left; width: 385px; height: 117px; margin: 0px;padding-left: 30px;" /&gt; &lt;img alt="axa_logo" id="axa_logo" src="https://media.all-in-group.fr/SNPMNS/gestad/axa_logo.png" style="float: right; border-width: 0px; border-style: none; width: 79px; height: 77px; margin: 0px;padding-right:30px;padding-top:20px;" /&gt;&lt;/div&gt; &lt;!-- Corps de lettre --&gt; &lt;div style="padding-top:130px"&gt; &lt;p class="western" style="margin-left: 8.4cm; margin-bottom: 0cm; orphans: 2; widows: 2; background: transparent; page-break-before: auto"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;&lt;b&gt;Guillaume Sorel&lt;br /&gt;vfdbv&lt;br /&gt;&lt;br /&gt;bvxb bsv&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &amp;nbsp; &lt;p align="center" class="western"&gt;&lt;font face="Arial, sans-serif" size="4" style="font-size: 14pt"&gt;&lt;b&gt;ATTESTATION D’ASSURANCE RESPONSABILITÉ CIVILE PRESTATAIRE DE SERVICE &lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &amp;nbsp; &lt;p class="western"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2" style="font-size: 10pt"&gt;&lt;u&gt;&lt;b&gt;Contrat d’assurance n° 639 7892 90 000&lt;/b&gt;&lt;/u&gt; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="western"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;&lt;b&gt;CABINET D’ASSURANCE Sébastien FARINA&lt;br /&gt;16, rue Alfred Couturier 78160 - MARLY LE ROI&lt;br /&gt;Tél.&amp;nbsp;: 01 39 16 24 15&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &amp;nbsp; &lt;p class="western" style="margin-bottom: 0cm; text-align: left;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;M. Sorel,&lt;br /&gt;Conformément à l’obligation d’assurance du Code du Sport et du Code de la Consommation, nous vous signalons que votre contrat d’assurance couvre, en correspondance avec votre cotisation syndicale, la période du &lt;/font&gt;&lt;/p&gt; &lt;h1 align="center" class="western"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size:10pt"&gt;28 août 2019 AU 27 août 2020&lt;/font&gt;&lt;/h1&gt; &amp;nbsp; &lt;hr /&gt;&amp;nbsp; &lt;p class="western" style="text-align: left;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;Nous soussignés, SNPMNS 80, boulevard du Général Leclerc B.P.3 92113 CLICHY la GARENNE certifions que&amp;nbsp;:&lt;/font&gt;&lt;/p&gt; &lt;p class="western"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;Guillaume Sorel - vfdbv - bvxb bsv&lt;/font&gt;&lt;/p&gt; &lt;p class="western" style="text-align: left;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;a versé, au titre de la cotisation syndicale comprenant l’assurance pour l’année à date anniversaire de l’adhésion la somme de&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p class="western" style="text-align: center;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;&lt;b&gt;SOIXANTE TREIZE EUROS (73 €)&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="western" style="text-align: left;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;La présente vous est adressée pour toute utilisation, employeur ou autre demande.&lt;br /&gt;Restant à votre disposition pour tout renseignement complémentaire, veuillez agréer, cher(e) collègue mes salutations distinguées.&lt;/font&gt;&lt;/p&gt; &lt;div style="padding-right:30px;"&gt; &lt;p align="right" class="western"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;Le trésorier,&lt;br /&gt;Roland MEUNIER&lt;/font&gt;&lt;/p&gt; &lt;p align="right"&gt;&lt;img alt="signature_roland-meunier" border="0" float="right" height="84" id="signature_roland-meunier" src="https://media.all-in-group.fr/SNPMNS/gestad/signature_roland-meunier.jpg" width="94" /&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- Footer --&gt; &lt;div style="text-align: center;" title="footer"&gt; &lt;p align="center"&gt;&lt;font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt"&gt;Centre du Landy &lt;b&gt;&lt;font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt"&gt;•&lt;/font&gt;&lt;/b&gt; 80, boulevard du Général Leclerc B.P. 3 &lt;b&gt;•&lt;/b&gt; Clichy-la-Garenne Cedex&lt;br /&gt;Téléphone&amp;nbsp;: 01 42 42 95 34 &lt;b&gt;&lt;font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt"&gt;•&lt;/font&gt;&lt;/b&gt; Syndicat régi par la loi du 21 Mars 1884 &lt;b&gt;&lt;font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt"&gt;•&lt;/font&gt;&lt;/b&gt; N° Enregistrement&amp;nbsp;: 92 11 81&lt;br /&gt;&lt;a href="mailto:snpmns.org@gmail.com" style="color:#2a6099;text-decoration: none;"&gt;snpmns.org@gmail.com&lt;/a&gt; &lt;a href="https://www.snpmns.org" style="color:#2a6099;text-decoration:none"&gt;www.snpmns.org&lt;/a&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; line 9]: syntax error: unrecognized tag: color: #800000; text-decoration: underline (Smarty_Compiler.class.php, line 441) dans Smarty-&gt;trigger_error() (ligne 1100 dans /home/allingro/gestad/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php).
  
  
  User error : Smarty error: [in string:&lt;meta content="text/html; charset=utf-8" http-equiv="content-type" /&gt; &lt;title&gt;&lt;/title&gt; &lt;style&gt;@page { size: 21cm 29.7cm; margin-left: 1.5cm; margin-right: 1.5cm; margin-top: 1.5cm; margin-bottom: 1.1cm } p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 115%; orphans: 2; widows: 2; background: transparent } p.western { font-family: "Times New Roman", serif; font-size: 10pt; } h1 { margin-bottom: 0.11cm; direction: ltr; color: #000000; orphans: 2; widows: 2; background: transparent; page-break-after: avoid } h1.western { font-family: "Arial", sans-serif; font-size: 14pt; font-weight: bold } a:link { color: #000080; text-decoration: underline } a:visited { color: #800000; text-decoration: underline } &lt;/style&gt; &lt;table align="center" border="0" cellpadding="0" cellspacing="0" class="background" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; width: 100%;" width="100%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="center" bgcolor="#FFFFFF" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;" valign="top"&gt; &lt;table align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" class="wrapper" style="outline: none;border-collapse: collapse; border-spacing: 0; padding: 0; width: inherit;" width="100%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="center" style="padding: 0px 0px 0px 0px;border-collapse: collapse; border-spacing: 0; margin: 0;" valign="top"&gt;&lt;!-- Header Logos --&gt; &lt;div style="padding-bottom:130px"&gt;&lt;img alt="logo_SNPMNS" id="logo_SNPMNS" src="https://media.all-in-group.fr/SNPMNS/gestad/Logox2.png" style="border-width: 0px; border-style: none; float: left; width: 385px; height: 117px; margin: 0px;padding-left: 30px;" /&gt; &lt;img alt="axa_logo" id="axa_logo" src="https://media.all-in-group.fr/SNPMNS/gestad/axa_logo.png" style="float: right; border-width: 0px; border-style: none; width: 79px; height: 77px; margin: 0px;padding-right:30px;padding-top:20px;" /&gt;&lt;/div&gt; &lt;!-- Corps de lettre --&gt; &lt;div style="padding-top:130px"&gt; &lt;p class="western" style="margin-left: 8.4cm; margin-bottom: 0cm; orphans: 2; widows: 2; background: transparent; page-break-before: auto"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;&lt;b&gt;Guillaume Sorel&lt;br /&gt;vfdbv&lt;br /&gt;&lt;br /&gt;bvxb bsv&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &amp;nbsp; &lt;p align="center" class="western"&gt;&lt;font face="Arial, sans-serif" size="4" style="font-size: 14pt"&gt;&lt;b&gt;ATTESTATION D’ASSURANCE RESPONSABILITÉ CIVILE PRESTATAIRE DE SERVICE &lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &amp;nbsp; &lt;p class="western"&gt;&lt;font face="Arial, sans-serif"&gt;&lt;font size="2" style="font-size: 10pt"&gt;&lt;u&gt;&lt;b&gt;Contrat d’assurance n° 639 7892 90 000&lt;/b&gt;&lt;/u&gt; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="western"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;&lt;b&gt;CABINET D’ASSURANCE Sébastien FARINA&lt;br /&gt;16, rue Alfred Couturier 78160 - MARLY LE ROI&lt;br /&gt;Tél.&amp;nbsp;: 01 39 16 24 15&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &amp;nbsp; &lt;p class="western" style="margin-bottom: 0cm; text-align: left;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;M. Sorel,&lt;br /&gt;Conformément à l’obligation d’assurance du Code du Sport et du Code de la Consommation, nous vous signalons que votre contrat d’assurance couvre, en correspondance avec votre cotisation syndicale, la période du &lt;/font&gt;&lt;/p&gt; &lt;h1 align="center" class="western"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size:10pt"&gt;28 août 2019 AU 27 août 2020&lt;/font&gt;&lt;/h1&gt; &amp;nbsp; &lt;hr /&gt;&amp;nbsp; &lt;p class="western" style="text-align: left;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;Nous soussignés, SNPMNS 80, boulevard du Général Leclerc B.P.3 92113 CLICHY la GARENNE certifions que&amp;nbsp;:&lt;/font&gt;&lt;/p&gt; &lt;p class="western"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;Guillaume Sorel - vfdbv - bvxb bsv&lt;/font&gt;&lt;/p&gt; &lt;p class="western" style="text-align: left;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;a versé, au titre de la cotisation syndicale comprenant l’assurance pour l’année à date anniversaire de l’adhésion la somme de&amp;nbsp;&lt;/font&gt;&lt;/p&gt; &lt;p class="western" style="text-align: center;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;&lt;b&gt;SOIXANTE TREIZE EUROS (73 €)&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p class="western" style="text-align: left;"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;La présente vous est adressée pour toute utilisation, employeur ou autre demande.&lt;br /&gt;Restant à votre disposition pour tout renseignement complémentaire, veuillez agréer, cher(e) collègue mes salutations distinguées.&lt;/font&gt;&lt;/p&gt; &lt;div style="padding-right:30px;"&gt; &lt;p align="right" class="western"&gt;&lt;font face="Arial, sans-serif" size="2" style="font-size: 10pt"&gt;Le trésorier,&lt;br /&gt;Roland MEUNIER&lt;/font&gt;&lt;/p&gt; &lt;p align="right"&gt;&lt;img alt="signature_roland-meunier" border="0" float="right" height="84" id="signature_roland-meunier" src="https://media.all-in-group.fr/SNPMNS/gestad/signature_roland-meunier.jpg" width="94" /&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- Footer --&gt; &lt;div style="text-align: center;" title="footer"&gt; &lt;p align="center"&gt;&lt;font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt"&gt;Centre du Landy &lt;b&gt;&lt;font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt"&gt;•&lt;/font&gt;&lt;/b&gt; 80, boulevard du Général Leclerc B.P. 3 &lt;b&gt;•&lt;/b&gt; Clichy-la-Garenne Cedex&lt;br /&gt;Téléphone&amp;nbsp;: 01 42 42 95 34 &lt;b&gt;&lt;font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt"&gt;•&lt;/font&gt;&lt;/b&gt; Syndicat régi par la loi du 21 Mars 1884 &lt;b&gt;&lt;font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt"&gt;•&lt;/font&gt;&lt;/b&gt; N° Enregistrement&amp;nbsp;: 92 11 81&lt;br /&gt;&lt;a href="mailto:snpmns.org@gmail.com" style="color:#2a6099;text-decoration: none;"&gt;snpmns.org@gmail.com&lt;/a&gt; &lt;a href="https://www.snpmns.org" style="color:#2a6099;text-decoration:none"&gt;www.snpmns.org&lt;/a&gt;&lt;/font&gt;&lt;/p&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; line 9]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 585) dans Smarty-&gt;trigger_error() (ligne 1100 dans /home/allingro/gestad/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php).
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>SOLUTION brought by DEMERIT: 
  For javascripts and css in template, we have to use <code>{literal}...{/literal}</code> around javascripts or css style declaration.
  <a href="https://www.smarty.net/docsv2/fr/language.function.literal.tpl" rel="nofollow noreferrer">more on smarty documentation</a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-28T18:29:20.117Z
Comments.Text: Is the styling in a message template, and if so is it wrapped with `{literal}...{/literal}`?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T07:16:27.360Z
Comments.Text: yes it's a message template with HTML not directly sent as it is but transformed into a .pdf sent attached to another message. Before I used smarty, it perfectly worked.
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T07:17:01.637Z
Comments.Text: I haven't used {literal}...{/literal}.
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T07:30:16.330Z
Comments.Text: thanks Demerit! this was the answer. You saved my day :-)
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T12:53:02.700Z
Comments.Text: Great!.........
Comments.UserDisplayName: Demerit
Tags: <smarty>
Title: SMARTY error with template
ThreadText: # SMARTY error with template
  
  (Asked by: username_0 on 2019-08-28)
  
  I have this issue I don't understand with a civirule that should be sending an email with a .pdf attached when adding a member to a group but it's blocked by Smarty during the process of merging the fields and creating the pdf file.
  
  If I look at Drupal's log, I can identify these User error. I checked the html code with the W3C validator and there's nothing special at it.
  
  They are all related to the style but I don't know how and if can improve anything except using inline style but it's a pdf not an email.
  
  I tried with CKEditor turned off and it changed nothing.
  
  Here are some examples:
  
  ```
  User error : Smarty error: [in string:<meta content="text/html; charset=utf-8" http-equiv="content-type" /> <title></title> <style>@page { size: 21cm 29.7cm; margin-left: 1.5cm; margin-right: 1.5cm; margin-top: 1.5cm; margin-bottom: 1.1cm } p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 115%; orphans: 2; widows: 2; background: transparent } p.western { font-family: "Times New Roman", serif; font-size: 10pt; } h1 { margin-bottom: 0.11cm; direction: ltr; color: #000000; orphans: 2; widows: 2; background: transparent; page-break-after: avoid } h1.western { font-family: "Arial", sans-serif; font-size: 14pt; font-weight: bold } a:link { color: #000080; text-decoration: underline } a:visited { color: #800000; text-decoration: underline } </style> <table align="center" border="0" cellpadding="0" cellspacing="0" class="background" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; width: 100%;" width="100%"> <tbody> <tr> <td align="center" bgcolor="#FFFFFF" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;" valign="top"> <table align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" class="wrapper" style="outline: none;border-collapse: collapse; border-spacing: 0; padding: 0; width: inherit;" width="100%"> <tbody> <tr> <td align="center" style="padding: 0px 0px 0px 0px;border-collapse: collapse; border-spacing: 0; margin: 0;" valign="top"><!-- Header Logos --> <div style="padding-bottom:130px"><img alt="logo_SNPMNS" id="logo_SNPMNS" src="https://media.all-in-group.fr/SNPMNS/gestad/Logox2.png" style="border-width: 0px; border-style: none; float: left; width: 385px; height: 117px; margin: 0px;padding-left: 30px;" /> <img alt="axa_logo" id="axa_logo" src="https://media.all-in-group.fr/SNPMNS/gestad/axa_logo.png" style="float: right; border-width: 0px; border-style: none; width: 79px; height: 77px; margin: 0px;padding-right:30px;padding-top:20px;" /></div> <!-- Corps de lettre --> <div style="padding-top:130px"> <p class="western" style="margin-left: 8.4cm; margin-bottom: 0cm; orphans: 2; widows: 2; background: transparent; page-break-before: auto"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>username_0 username_0<br />vfdbv<br /><br />bvxb bsv</b></font></p> &nbsp; <p align="center" class="western"><font face="Arial, sans-serif" size="4" style="font-size: 14pt"><b>ATTESTATION D’ASSURANCE RESPONSABILITÉ CIVILE PRESTATAIRE DE SERVICE </b></font></p> &nbsp; <p class="western"><font face="Arial, sans-serif"><font size="2" style="font-size: 10pt"><u><b>Contrat d’assurance n° 639 7892 90 000</b></u> </font></font></p> <p class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>CABINET D’ASSURANCE Sébastien FARINA<br />16, rue Alfred Couturier 78160 - MARLY LE ROI<br />Tél.&nbsp;: 01 39 16 24 15</b></font></p> &nbsp; <p class="western" style="margin-bottom: 0cm; text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">M. username_0,<br />Conformément à l’obligation d’assurance du Code du Sport et du Code de la Consommation, nous vous signalons que votre contrat d’assurance couvre, en correspondance avec votre cotisation syndicale, la période du </font></p> <h1 align="center" class="western"><font face="Arial, sans-serif" size="2" style="font-size:10pt">28 août 2019 AU 27 août 2020</font></h1> &nbsp; <hr />&nbsp; <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Nous soussignés, SNPMNS 80, boulevard du Général Leclerc B.P.3 92113 CLICHY la GARENNE certifions que&nbsp;:</font></p> <p class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">username_0 username_0 - vfdbv - bvxb bsv</font></p> <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">a versé, au titre de la cotisation syndicale comprenant l’assurance pour l’année à date anniversaire de l’adhésion la somme de&nbsp;</font></p> <p class="western" style="text-align: center;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>SOIXANTE TREIZE EUROS (73 €)</b></font></p> <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">La présente vous est adressée pour toute utilisation, employeur ou autre demande.<br />Restant à votre disposition pour tout renseignement complémentaire, veuillez agréer, cher(e) collègue mes salutations distinguées.</font></p> <div style="padding-right:30px;"> <p align="right" class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Le trésorier,<br />Roland MEUNIER</font></p> <p align="right"><img alt="signature_roland-meunier" border="0" float="right" height="84" id="signature_roland-meunier" src="https://media.all-in-group.fr/SNPMNS/gestad/signature_roland-meunier.jpg" width="94" /></p> </div> </div> <!-- Footer --> <div style="text-align: center;" title="footer"> <p align="center"><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">Centre du Landy <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> 80, boulevard du Général Leclerc B.P. 3 <b>•</b> Clichy-la-Garenne Cedex<br />Téléphone&nbsp;: 01 42 42 95 34 <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> Syndicat régi par la loi du 21 Mars 1884 <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> N° Enregistrement&nbsp;: 92 11 81<br /><a href="mailto:snpmns.org@gmail.com" style="color:#2a6099;text-decoration: none;">snpmns.org@gmail.com</a> <a href="https://www.snpmns.org" style="color:#2a6099;text-decoration:none">www.snpmns.org</a></font></p> </div> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> line 9]: syntax error: unrecognized tag: color: #800000; text-decoration: underline (Smarty_Compiler.class.php, line 441) dans Smarty->trigger_error() (ligne 1100 dans /home/allingro/gestad/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php).
  
  User error : Smarty error: [in string:<meta content="text/html; charset=utf-8" http-equiv="content-type" /> <title></title> <style>@page { size: 21cm 29.7cm; margin-left: 1.5cm; margin-right: 1.5cm; margin-top: 1.5cm; margin-bottom: 1.1cm } p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 115%; orphans: 2; widows: 2; background: transparent } p.western { font-family: "Times New Roman", serif; font-size: 10pt; } h1 { margin-bottom: 0.11cm; direction: ltr; color: #000000; orphans: 2; widows: 2; background: transparent; page-break-after: avoid } h1.western { font-family: "Arial", sans-serif; font-size: 14pt; font-weight: bold } a:link { color: #000080; text-decoration: underline } a:visited { color: #800000; text-decoration: underline } </style> <table align="center" border="0" cellpadding="0" cellspacing="0" class="background" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; width: 100%;" width="100%"> <tbody> <tr> <td align="center" bgcolor="#FFFFFF" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0;" valign="top"> <table align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" class="wrapper" style="outline: none;border-collapse: collapse; border-spacing: 0; padding: 0; width: inherit;" width="100%"> <tbody> <tr> <td align="center" style="padding: 0px 0px 0px 0px;border-collapse: collapse; border-spacing: 0; margin: 0;" valign="top"><!-- Header Logos --> <div style="padding-bottom:130px"><img alt="logo_SNPMNS" id="logo_SNPMNS" src="https://media.all-in-group.fr/SNPMNS/gestad/Logox2.png" style="border-width: 0px; border-style: none; float: left; width: 385px; height: 117px; margin: 0px;padding-left: 30px;" /> <img alt="axa_logo" id="axa_logo" src="https://media.all-in-group.fr/SNPMNS/gestad/axa_logo.png" style="float: right; border-width: 0px; border-style: none; width: 79px; height: 77px; margin: 0px;padding-right:30px;padding-top:20px;" /></div> <!-- Corps de lettre --> <div style="padding-top:130px"> <p class="western" style="margin-left: 8.4cm; margin-bottom: 0cm; orphans: 2; widows: 2; background: transparent; page-break-before: auto"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>username_0 username_0<br />vfdbv<br /><br />bvxb bsv</b></font></p> &nbsp; <p align="center" class="western"><font face="Arial, sans-serif" size="4" style="font-size: 14pt"><b>ATTESTATION D’ASSURANCE RESPONSABILITÉ CIVILE PRESTATAIRE DE SERVICE </b></font></p> &nbsp; <p class="western"><font face="Arial, sans-serif"><font size="2" style="font-size: 10pt"><u><b>Contrat d’assurance n° 639 7892 90 000</b></u> </font></font></p> <p class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>CABINET D’ASSURANCE Sébastien FARINA<br />16, rue Alfred Couturier 78160 - MARLY LE ROI<br />Tél.&nbsp;: 01 39 16 24 15</b></font></p> &nbsp; <p class="western" style="margin-bottom: 0cm; text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">M. username_0,<br />Conformément à l’obligation d’assurance du Code du Sport et du Code de la Consommation, nous vous signalons que votre contrat d’assurance couvre, en correspondance avec votre cotisation syndicale, la période du </font></p> <h1 align="center" class="western"><font face="Arial, sans-serif" size="2" style="font-size:10pt">28 août 2019 AU 27 août 2020</font></h1> &nbsp; <hr />&nbsp; <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Nous soussignés, SNPMNS 80, boulevard du Général Leclerc B.P.3 92113 CLICHY la GARENNE certifions que&nbsp;:</font></p> <p class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">username_0 username_0 - vfdbv - bvxb bsv</font></p> <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">a versé, au titre de la cotisation syndicale comprenant l’assurance pour l’année à date anniversaire de l’adhésion la somme de&nbsp;</font></p> <p class="western" style="text-align: center;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt"><b>SOIXANTE TREIZE EUROS (73 €)</b></font></p> <p class="western" style="text-align: left;"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">La présente vous est adressée pour toute utilisation, employeur ou autre demande.<br />Restant à votre disposition pour tout renseignement complémentaire, veuillez agréer, cher(e) collègue mes salutations distinguées.</font></p> <div style="padding-right:30px;"> <p align="right" class="western"><font face="Arial, sans-serif" size="2" style="font-size: 10pt">Le trésorier,<br />Roland MEUNIER</font></p> <p align="right"><img alt="signature_roland-meunier" border="0" float="right" height="84" id="signature_roland-meunier" src="https://media.all-in-group.fr/SNPMNS/gestad/signature_roland-meunier.jpg" width="94" /></p> </div> </div> <!-- Footer --> <div style="text-align: center;" title="footer"> <p align="center"><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">Centre du Landy <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> 80, boulevard du Général Leclerc B.P. 3 <b>•</b> Clichy-la-Garenne Cedex<br />Téléphone&nbsp;: 01 42 42 95 34 <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> Syndicat régi par la loi du 21 Mars 1884 <b><font color="#2a6099" face="Arial, sans-serif" size="2" style="font-size: 9pt">•</font></b> N° Enregistrement&nbsp;: 92 11 81<br /><a href="mailto:snpmns.org@gmail.com" style="color:#2a6099;text-decoration: none;">snpmns.org@gmail.com</a> <a href="https://www.snpmns.org" style="color:#2a6099;text-decoration:none">www.snpmns.org</a></font></p> </div> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> line 9]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 585) dans Smarty->trigger_error() (ligne 1100 dans /home/allingro/gestad/sites/all/modules/civicrm/packages/Smarty/Smarty.class.php).
  
  ```
  
  Any ideas?
  
  SOLUTION brought by username_1:
  For javascripts and css in template, we have to use `{literal}...{/literal}` around javascripts or css style declaration.
  [more on smarty documentation](https://www.smarty.net/docsv2/fr/language.function.literal.tpl)
  
  **Tags:** smarty
  
  > **Comments:**
  > **username_1**: Is the styling in a message template, and if so is it wrapped with `{literal}...{/literal}`?  
  > **username_0**: yes it's a message template with HTML not directly sent as it is but transformed into a .pdf sent attached to another message. Before I used smarty, it perfectly worked.  
  > **username_0**: I haven't used {literal}...{/literal}.  
  > **username_0**: thanks username_1! this was the answer. You saved my day :-)  
  > **username_1**: Great!.........  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-08-29. Score: 7 | Accepted answer
  
  The styling needs to be wrapped in `{literal}...{/literal}` in the message template.
  
  > **Comments:**
  > **username_2**: See also this related answer https://civicrm.stackexchange.com/questions/17643/scheduled-reminders-email-head-css-attributes-are-being-stripped-out  
  
  ---
  
  