Hi there !<div><br></div><div>I faced a bug with imagePathFromUrl (some websnaps doesn&#39;t get printed in my speed dial) so I checked it out and I found a the quick&#39;n&#39;dirty imagePathFromUrl() method, which removes some chars in order to make them suitable as filenames. I also saw the comment about &quot;do something better, learn regular expressions&quot;.</div>

<div>I don&#39;t believe we need someone knowing regular expression to do that (I can do regular expressions but we don&#39;t really need those in that case and with QString). So here is what I came up with, it&#39;s easy, not as clean as it could be, but it should do the trick :</div>

<div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
    QStringList toReplace, replacers;</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<br></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

    toReplace &lt;&lt; &quot;%&quot; &lt;&lt; &quot;/&quot; &lt;&lt; &quot;&amp;&quot; &lt;&lt; &quot;,&quot; &lt;&lt; &quot;+&quot; &lt;&lt; &quot;$&quot; &lt;&lt; &quot;:&quot; &lt;&lt; &quot;;&quot; &lt;&lt; &quot;=&quot; &lt;&lt; &quot;?&quot; &lt;&lt; &quot;@&quot; &lt;&lt; &quot;#&quot; &lt;&lt; &quot;\\&quot; &lt;&lt; &quot;|&quot;;</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
    replacers &lt;&lt; &quot;%25&quot; &lt;&lt; &quot;%2F&quot; &lt;&lt; &quot;%26&quot; &lt;&lt; &quot;%2C&quot; &lt;&lt; &quot;%2B&quot; &lt;&lt; &quot;%24&quot; &lt;&lt; &quot;%3A&quot; &lt;&lt; &quot;%3B&quot; &lt;&lt; &quot;%3D&quot; &lt;&lt; &quot;%3F&quot; &lt;&lt; &quot;%40&quot; &lt;&lt; &quot;%23&quot; &lt;&lt; &quot;%5C&quot; &lt;&lt; &quot;%7C&quot;;</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
    while (!(toReplace.empty()) &amp;&amp; !(replacers.empty()))</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

      name.replace(toReplace.takeFirst(), replacers.takeFirst());</blockquote></blockquote><div><div><br></div><div>I joined a diff file to the mail.</div><div>Hope I&#39;ve been helpfull : I have some issues with kdelibs4-dev so I can&#39;t test it right now, but I believe this should compile and work out-of-the-box.</div>
<div><br></div><div>+++++++++++++++++</div><div> <span class="Apple-style-span" style="font-family: &#39;Times New Roman&#39;; font-size: medium; ">Michaël Martín Moro</span></div><div>       Epitech 2013</div><div>+++++++++++++++++</div>

</div>