TR(TextParserFormattingTag.TR.type),
TD(TextParserFormattingTag.TD.type),
TH(TextParserFormattingTag.TH.type),
- URL(TextParserFormattingTag.EXTLINK.type),
+ URL(TextParserTagType.Direct(
+ { tagParam, _ ->
+ val url = tagParam?.let { TextParserState.censorText(it) }
+ val attr = url?.let { " href=\"$it\" rel=\"ugc nofollow\"" } ?: ""
+
+ "<a$attr>"
+ },
+ { "</a>" },
+ )),
LANG(TextParserFormattingTag.LANG.type),
REPLY(
TextParserTagType.Indirect { _, content, _ ->
sanitizeId(content)?.let { id ->
- "<a href=\"/comment/view/$id\">>>$id</a>"
+ "<a href=\"/comment/view/$id\" rel=\"ugc\">>>$id</a>"
} ?: "[reply]$content[/reply]"
}
),