diff --git a/core/helpers.asp b/core/helpers.asp
index fecbb57..a735410 100644
--- a/core/helpers.asp
+++ b/core/helpers.asp
@@ -329,7 +329,7 @@ Function RenderPostBody(ByVal body)
End If
raw = CStr(body)
- If InStr(1, raw, "<", vbTextCompare) > 0 And InStr(1, raw, ">", vbTextCompare) > 0 Then
+ If IsHtmlPostBody(raw) Then
RenderPostBody = raw
Else
raw = Server.HTMLEncode(raw)
@@ -340,6 +340,35 @@ Function RenderPostBody(ByVal body)
End If
End Function
+Function IsHtmlPostBody(ByVal text)
+ Dim lowerText
+ lowerText = LCase(CStr(text))
+ IsHtmlPostBody = _
+ (InStr(lowerText, "
0) Or _
+ (InStr(lowerText, "
0) Or _
+ (InStr(lowerText, "
0) Or _
+ (InStr(lowerText, "
0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, "- 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, "
0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0) Or _
+ (InStr(lowerText, " 0)
+End Function
+
+Function AiImageUrl(ByVal prompt)
+ AiImageUrl = "https://gen.pollinations.ai/image/" & Server.URLEncode(Trim(CStr(prompt)))
+End Function
+
'------------------------------------------------------------------------------
' Canonical application URL helpers
' - Categories use numeric IDs