#13419 closed defect (bug) (worksforme)
comment_excerpt does not use htmlspecialchars
| Reported by: | gene91 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Comments | Version: | |
| Severity: | normal | Keywords: | comment_excerpt |
| Cc: | Focuses: |
Description
As a result, I will have to always use
echo htmlspecialchar(get_comment_excerpt())
if I don't want my blog goes wrong as there could be quotes in the comment.
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You can add this single line into your theme's functions.php:
add_filter('comment_excerpt', 'esc_html');