title: Mermaid CLI - how do you escape characters?
body: <p>I'm using the Mermaid CLI to generate a flowchart (<a href="http://knsv.github.io/mermaid/flowchart.html" rel="noreferrer">http://knsv.github.io/mermaid/flowchart.html</a>).  It works great, but I can't figure out how to get special characters (percent signs, parenthesis, etc) working as text within a node.</p>
  
  <p>For illustration purposes here is a sample flowchart definition for Mermaid (filename is example.mermaid):</p>
  
  <pre><code>graph TD
  question1{Gas tank less than 1/8?}
  action1[Fill tank to 100%]
  question1-- Yes --&gt;action1
  </code></pre>
  
  <p>When I run mermaid on that file, I get this error (it blows up on the percent sign):</p>
  
  <pre><code>My-MacBook-Pro:mermaid mark$ mermaid example.mermaid 
  Error: Parse error on line 3:
  ...on1[Fill tank to 100%]question1-- Yes -
  -----------------------^
  Expecting 'QUOTE', 'TAG_END', 'TAG_START', 'MULT', 'EQUALS', 'PLUS', 'DOT', 'BRKT', 'COLON', 'ALPHA', 'COMMA', 'NUM', 'CLICK', 'CLASS', 'CLASSDEF', 'LINKSTYLE', 'STYLE', 'PIPE', 'THICK_ARROW_OPEN', 'THICK_ARROW_CROSS', 'THICK_ARROW_CIRCLE', 'THICK_ARROW_POINT', 'DOTTED_ARROW_OPEN', 'DOTTED_ARROW_CROSS', 'DOTTED_ARROW_CIRCLE', 'DOTTED_ARROW_POINT', 'ARROW_OPEN', 'ARROW_CROSS', 'ARROW_CIRCLE', 'ARROW_POINT', '==', '-.', '--', 'MINUS', 'DIAMOND_STOP', 'DIAMOND_START', 'PE', 'PS', 'SQE', 'SQS', 'end', 'subgraph', 'NEWLINE', 'TAGSTART', 'TAGEND', 'DIR', 'SPACE', 'GRAPH', 'EOF', 'SEMI', got 'PCT'
  
    ../dist/mermaid.full.js:14712 in parseError
    ../dist/mermaid.full.js:14782 in parse
    ../dist/mermaid.full.js:13260
    ../dist/mermaid.full.js:16846
    ../dist/mermaid.full.js:16889
    phantomjs://webpage.evaluate():23 in executeInPage
    phantomjs://webpage.evaluate():29
    phantomjs://webpage.evaluate():29
  PHANTOM ERROR: TypeError: 'null' is not an object (evaluating 'element.setAttribute')
  TRACE:
   -&gt; /usr/local/lib/node_modules/mermaid/lib/phantomscript.js: 149 (in function resolveSVGElement)
   -&gt; /usr/local/lib/node_modules/mermaid/lib/phantomscript.js: 69
  </code></pre>
  
  <p>I tried escaping the percent sign, like this:</p>
  
  <pre><code>action1[Fill tank to 100&amp;amp;]
  </code></pre>
  
  <p>But then I get the same error on the semicolon.  Any thoughts on how I can escape those characters to make it work?  Thanks!</p>