This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
I am writing a site that works sort of like a forum such as the JavaRanch forums. I have a Rich Text Editor I am using to allow users to write whatever they like in their post.
I'd like to allow developer posts in which code may be included. In doing so I open up the possibility of people injecting client side scripts that download malware or otherwise cause annoyances or harm to peoples computers.
What are the recommended methods for allowing people to post code without exposing your application to malicious code that will execute when end-users read their posts?