feat: official Postiz icon + strip HTML from post content display
Release APK / build (push) Has been cancelled
Release APK / build (push) Has been cancelled
- Replace icon.png with official Postiz logo (1024x1024, generated from upstream postiz.svg at gitroomhq/postiz-app) - Add lib/stripHtml.ts: converts <br>/<p> to newlines, strips all tags, decodes HTML entities - PostCard: use stripHtml on content before truncation and display - posts.tsx: use stripHtml for context menu preview and clipboard copy (API payloads keep original HTML for retry/reschedule) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
export function stripHtml(html: string): string {
|
||||
return html
|
||||
.replace(/<br\s*\/?>/gi, "\n")
|
||||
.replace(/<\/p>/gi, "\n")
|
||||
.replace(/<[^>]+>/g, "")
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, "'")
|
||||
.replace(/ /g, " ")
|
||||
.replace(/\n{3,}/g, "\n\n")
|
||||
.trim();
|
||||
}
|
||||
Reference in New Issue
Block a user