Shopify Liquid. If line.title contains '<br>' statement is not working
<p>We are using Shopify where we have an invoice page where product title and other data is showing.</p>

<p>My problem is that product.title is displaying <code>&lt;br&gt;</code> tag on the invoice page.<br>
<em>(On the product page title is displaying w/o <code>&lt;br&gt;</code> tag)</em><br></p>

<p>The reason for this is that <code>product.title</code> can only be entered via WYSIWYG.<br> Where WYSIWYG encodes <code>product.title</code> into ASCII code and decodes <code>product.title</code> on the invoice page.</p>

<p>I am trying to find and replace/hide <code>&lt;br&gt;</code> tag inside <code>product.title</code> using Liquid string filter<br> <code>{{ product.title | replace: 'Awesome', 'Mega' }}</code> with <code>{% if %}</code> statement  and it is not working. If i'll change <code>{% if line.title contains '&lt;br&gt;'%}</code> to <code>{% if line.title contains 'Dress'%}</code> the code will replace <strong>Dress</strong> with white space.<br>
Kindly find below part of my code. </p>

<p><strong>Part of the code i added</strong></p>

<pre><code>{% if line.title contains '&lt;br&gt;'%} {{ line.title | replace: '&lt;br&gt;', ' ' }} {% endif %}
</code></pre>

<p><strong>General code</strong></p>

<pre><code>&lt;td class="order-list__product-description-cell" style="width:100%"&gt;
  {% if line.product.title %} {% assign line_title = line.product.title %} 
  {% else %} {% assign line_title = line.title %} {% endif %}
  &lt;span class="order-list__item-title"&gt;

 &lt;!-- Replace if statement --&gt;

  {% if line.title contains '&lt;br&gt;'%} {{ line.title | replace: '&lt;br&gt;', ' ' }}
  {% endif %} 

  &lt;!-- Replace if statement --&gt;

  {{ line_title }} × {{ line.quantity }}
&lt;/span&gt;
&lt;br/&gt; {% if line.variant.title != 'Default Title' %}
&lt;span class="order-list__item-variant"&gt;{{ line.variant.title }}&lt;/span&gt; {% endif %}
</code></pre>

<p></p>

<p>I would highly appreciate if you could please tell me what am i doing wrong and guide me on how to implement this in the right way.
<em>Meanwhile waiting for Shopify to fix the issue of displaying tags in their app</em></p>