QTextBrowser won't append link correctly if that link has equals sign inside it
<pre><code>class TextBrowser(QtGui.QTextBrowser):
    def __init__(self, parent=None):
        QtGui.QTextBrowser.__init__(self, parent)
        self.setAcceptRichText(True)
        self.setOpenExternalLinks(True)
        self.insertHtml('&lt;a href=' + 'https://www.google.com/#q=dfsdf'+'&gt;' + 'gg' + '&lt;/a&gt;')
        self.append('&lt;a href=' + 'https://www.google.com/#q=dfsdf' + '&gt;' + 'gg' + '&lt;/a&gt;')
</code></pre>

<p>So anytime I try to append link that has equals sign QTextBrowser will append only part of the link before the sign. <a href="https://www.google.com/#q=dfsdf" rel="nofollow">https://www.google.com/#q=dfsdf</a> will become <a href="https://www.google.com/#q" rel="nofollow">https://www.google.com/#q</a></p>

<pre><code>setHtml()
</code></pre>

<p>works correctly but I just want to add clickable link - not to clean the whole area to display link only.
Anything I can do about it?</p>

<p>Always make sure html attributes are enclosed in double-quotes, otherwise special characters like <code>=</code> may be parsed wrongly. The html should look like this:</p>

<pre><code>    &lt;a href="https://www.google.com/#q=dfsdf"&gt;gg&lt;/a&gt;
</code></pre>

python python-2.7 qt pyqt qt4