escape bare html entities
This commit is contained in:
parent
689b9a57b1
commit
72b3d2f6d1
|
@ -73,7 +73,7 @@ public class MarkDownProcessor {
|
|||
Set<Extension> extensions = Collections.singleton(TablesExtension.create());
|
||||
Parser parser = Parser.builder().extensions(extensions).build();
|
||||
Node document = parser.parse(source);
|
||||
HtmlRenderer renderer = HtmlRenderer.builder().extensions(extensions).build();
|
||||
HtmlRenderer renderer = HtmlRenderer.builder().escapeHtml(true).extensions(extensions).build();
|
||||
String html = renderer.render(document);
|
||||
html = html.replace("<table>", "<table class=\"grid\">");
|
||||
return html;
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -111,12 +111,12 @@
|
|||
<dependency>
|
||||
<groupId>com.atlassian.commonmark</groupId>
|
||||
<artifactId>commonmark</artifactId>
|
||||
<version>0.12.1</version>
|
||||
<version>0.17.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.atlassian.commonmark</groupId>
|
||||
<artifactId>commonmark-ext-gfm-tables</artifactId>
|
||||
<version>0.12.1</version>
|
||||
<version>0.17.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.rjeschke</groupId>
|
||||
|
|
Loading…
Reference in New Issue