title: How can I deal with special characters/ html code in mySQL query?
body: <p>I am using some html code inside the mySQL query:</p>
  
  <pre><code>  GROUP_CONCAT(DISTINCT CONCAT("&lt;i class=\'fa fa-circle-o\' style=\'color:",
    CASE
       WHEN animals.color = "red" THEN "#62bbd1"
       WHEN animals.color = "blue" THEN "#e9a5a9"
       WHEN animals.color = "orange" THEN "#ca6073"
       WHEN animals.color = "yellow" THEN "#c5b454"
       ELSE "#b7b7b7"
       END,"\'&gt;&lt;/i&gt; ",animals.name) 
    ORDER BY FIND_IN_SET(animals.color,"red,blue,orange,yellow,black") ASC, animals.name ASC SEPARATOR " &lt;br&gt;") AS animals, 
  </code></pre>
  
  <p>It is all working well.
  But I have problems, when <code>animals.name</code> has special characters. 
  For example:</p>
  
  <pre><code>James-Lauren
  Eva 1:2
  Margeret (coordinator)
  </code></pre>
  
  <p>This means I get a correct output until that word with special characters. Then the output stops.</p>