[Owasp-leaders] Wiki and Syntax Highlighting

Jon Passki jon.passki at owasp.org
Tue Jul 2 02:15:44 UTC 2013

Thank you for replying Torsten.

I am looking to do something similar to this:

<source lang="java">
package tutorial;
import com.opensymphony.xwork2.ActionSupport;
public class HelloWorld extends ActionSupport {
  private String name;
  public String getName() {
  return name;
  public void setName(String name) {
      this.name = name;
  public String execute() {
      name = "Hello, " + name + "!";
      return SUCCESS;

That would magically look like the output of http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/java.html

I'm too lazy to manually type in styles for each code snippet :-/


On Jul 1, 2013, at 2:33 PM, Torsten Gigler wrote:

> Hi Jon,
> I do a lot of highlighting for code snippets in our Wiki:
> https://www.owasp.org/index.php/Germany/Projekte/Top_10_fuer_Entwickler/A1_Injection
> {{Top_10_2010:ExampleBeginTemplate|year=2013}}
> <span style="color:red;">Query unsafeHQLQuery = session.createQuery("from accounts where custID='"+'''request.getParameter("id")'''+"'");</span>
> {{Top_10_2010:ExampleEndTemplate}}
> The Templates are invented by Neil Smithline for the OWASP Top 10:
> https://www.owasp.org/index.php/Top_10_2013-A1-Injection
> Remarks:
> * The 'year=2013' changes the style to brighter colors 
> * There is normally no need to use <nowiki> when you use the templates
> * It might be more work to get the right indents. I am using ':' 
> https://www.owasp.org/index.php/Germany/Projekte/Top_10_fuer_Entwickler/A5_Cross-Site_Request_Forgery_%28CSRF%29
> Kind regards
> Torsten
> Am 01.07.2013 16:02, schrieb Jon Passki:
>> All,
>> (If this list isn't the appropriate one to discuss the wiki, kindly steer me in the right direction.)
>> I looked at the XXE article [1] due to some potential issues with the recommendations. And it burns. Not the content. Well, the content might. But the syntax and lack of highlighting. It burns my eyes and sensibilities.
>> I'm using  '''<nowiki> ... </nowiki>''' for the code snippets. Maybe this is wrong. I didn't see anything in the help [2] section regarding syntax highlighting options. And I'm not too familiar with MediaWiki's options here. If there's an option, please let me know and I can play with it. If not, here are a bunch of MediaWiki syntax highlighters: http://www.mediawiki.org/wiki/Category:Syntax_highlighting_extensions.
>> This extension seems very promising and is relatively up-to-date: http://www.mediawiki.org/wiki/Extension:SyntaxHighlighter. If we don't have a highlighter could the wiki maintainers install this extension? If not for my needs, please think about the children that will be reading the wiki :)
>> Cheers,
>> Jon
>> [1] https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing
>> [2] https://www.owasp.org/index.php/Help:Editing
>> _______________________________________________
>> OWASP-Leaders mailing list
>> OWASP-Leaders at lists.owasp.org
>> https://lists.owasp.org/mailman/listinfo/owasp-leaders

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/owasp-leaders/attachments/20130701/c9d1fcef/attachment-0001.html>

More information about the OWASP-Leaders mailing list