I followed an example on a tutorial to create Spring MyBatis example. I got an error following the instructions in the document. However, I have solved my issue on a tutorial I followed to create an application and I want to post how I solved it. It was using & instead of & text which solved the issue for me.

I want the ampersand to be included in the comment section as like, &amp;. But after posting the comments it displays, the & instead of &amp;. I've tried to include it inside the <code></code> block and also tried to wrap it around with the <pre><code></code></pre> block but it doesn't work.

So how can I post the code block comment to display the &amp; string?

1 Answer 1


You need to (manually) HTML entity encode the HTML entity in order to display a literal HTML entity! In other words:


In fact, you need to manually HTML entity encode most HTML if you want to display the literal HTML in the comment, since Disqus allows you to use several HTML tags in order to format your comments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.