title: Replace all occurence in qml string
body: <p>I am trying to replace all occurrences of line breaks to html line breaks in my string, but it is only converting the  first one found</p>
  <pre><code>var output= &quot;&quot;;
  string x = &quot;Hi\nMy name is x\nAnd age is 10\n&quot;;
  output = x
  output = output.replace(&quot;\\n&quot;, &quot;&lt;br&gt;&quot;)
  </code></pre>
  <p>Output =</p>
  <pre><code>Hi
  My name is x\nAnd age is 10\n
  </code></pre>