diff --git a/application/src/main/java/run/halo/app/content/comment/AbstractCommentService.java b/application/src/main/java/run/halo/app/content/comment/AbstractCommentService.java index 66f6ee89c..34a50514a 100644 --- a/application/src/main/java/run/halo/app/content/comment/AbstractCommentService.java +++ b/application/src/main/java/run/halo/app/content/comment/AbstractCommentService.java @@ -24,7 +24,11 @@ public abstract class AbstractCommentService { protected final ReactiveExtensionClient client; protected final UserService userService; protected final CounterService counterService; - private final Safelist safelist = Safelist.relaxed(); + private final Safelist safelist = Safelist.relaxed() + // Allow tag, which is used for strikethrough + .addTags("s") + // Allow tag's class attribute, for syntax highlighting + .addAttributes("code", "class"); protected Mono fetchCurrentUser() { return ReactiveSecurityContextHolder.getContext()