Search code examples
c++wiki

Converting C++ code to HTML safe


I decided to try http://www.screwturn.eu/ wiki as a code snippet storage utility. So far I am very impressed, but what irkes me is that when I copy paste my code that I want to save, '<'s and '[' (http://en.wikipedia.org/wiki/Character_encodings_in_HTML#Character_references) invariably screw up the output as the wiki interprets them as either wiki or HTML tags.

Does anyone know a way around this? Or failing that, know of a simple utility that would take C++ code and convert it to HTML safe code?


Solution

  • Surround your code in <nowiki> .. </nowiki> tags.