Heads up! To view this whole video, sign in with your Courses Plus account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Compose allows you to prepend your function to the start of the function chain.
Addendum
Whoops! I forgot to use the Markdown input I made. HTML can be passed through CommonMark without a problem. So here is the updated code, also available in the repository.
String result = Renderer.render(htmlInput, markeddownSanitizer);
System.out.println("HTML is safe...");
System.out.println(result);
result = Renderer.render(markdownInput, markeddownSanitizer);
System.out.println("Markdown is too...");
System.out.println(result);
Learn more
- Atlassian's commonmark
- Markdown Syntax
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up