Commit a4b21c1
committed
feat: strip HTML comments from RSS feed descriptions
Add automatic HTML comment removal from all feed item descriptions to
ensure clean content in RSS and JSON feeds. Comments are stripped from
all content sources including markdown, page.meta descriptions, and
full page content.
- Add strip_html_comments() static method to Util class
- Update get_description_or_abstract() to strip comments in all code paths
- Handle both inline and multiline HTML comments
- Preserve content structure while removing comment artifacts
This prevents HTML comments (including TODO notes, analytics codes,
and other internal annotations) from appearing in published feeds.
Co-Authored-By: Claude <<EMAIL_ADDRESS>>1 parent 8b37500 commit a4b21c1
1 file changed
+32
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
486 | 488 | | |
487 | 489 | | |
488 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
489 | 503 | | |
490 | 504 | | |
491 | 505 | | |
| |||
514 | 528 | | |
515 | 529 | | |
516 | 530 | | |
517 | | - | |
| 531 | + | |
518 | 532 | | |
519 | | - | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
520 | 536 | | |
521 | 537 | | |
522 | | - | |
| 538 | + | |
523 | 539 | | |
524 | 540 | | |
525 | 541 | | |
| |||
528 | 544 | | |
529 | 545 | | |
530 | 546 | | |
531 | | - | |
532 | | - | |
533 | | - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
534 | 552 | | |
535 | 553 | | |
536 | 554 | | |
537 | 555 | | |
538 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
539 | 559 | | |
540 | | - | |
541 | | - | |
542 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
543 | 565 | | |
544 | 566 | | |
545 | 567 | | |
| |||
0 commit comments