Opened 9 years ago
Closed 9 years ago
#27827 closed defect (bug) (invalid)
Markup: Title with markup shows html markup when page attributes -> parent pages is being selected
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8.3 |
Component: | General | Keywords: | |
Focuses: | administration | Cc: |
Description
Well title itself describes every thing.
when setting parent page i observed that Title with markup shows html.
This is ugly and must be escaped with html strip_tags()
Attachments (3)
Change History (17)
#2
@
9 years ago
- Keywords has-patch added; needs-patch removed
- Resolution set to invalid
- Status changed from new to closed
class Walker_PageDropdown
on file post-template.php at line 1143 where post_title is html escaped..
I think instead of esc_html - strip_tags must be applied
EDIT: custom walker function must use strip_tags for displaying )]]
#3
follow-up:
↓ 8
@
9 years ago
- Keywords has-patch removed
- Milestone Awaiting Review deleted
Not sure why you have closed it as invalid, but yes, it's invalid.
You have chosen to include HTML in your title, so the title display should include the HTML. The posts list shows the title also HTML escaped.
@
9 years ago
Another edge case, the walker must ensure that at certain cases HTML stripped title must be displayed
#8
in reply to:
↑ 3
@
9 years ago
Replying to ocean90:
Not sure why you have closed it as invalid, but yes, it's invalid.
You have chosen to include HTML in your title, so the title display should include the HTML. The posts list shows the title also HTML escaped.
Yes I have chosen to have HTML tags in Post Title, not in nav menu, page atributes or other cases where it makes no sense, HTML tags in post title are used to make a semantic meaning for title or do some styling it is frontend purpose, but in dropdown_pages it makes no sense since neither semantic meaning nor style is required there. only the title of the post is significant in this case.
Am i right!!!!!!!!!??
#10
follow-up:
↓ 11
@
9 years ago
Title mean to be have plain text. If someone uses it as textarea to display HTML then there is no difference between title field and content editor.
#11
in reply to:
↑ 10
;
follow-up:
↓ 12
@
9 years ago
Replying to 5um17:
Title mean to be have plain text. If someone uses it as textarea to display HTML then there is no difference between title field and content editor.
To provide semantic meaning for post_title we need HTML tags so, post title needs HTML tags but not in all cases.
#12
in reply to:
↑ 11
;
follow-up:
↓ 13
@
9 years ago
Replying to manojhl123:
Replying to 5um17:
Title mean to be have plain text. If someone uses it as textarea to display HTML then there is no difference between title field and content editor.
To provide semantic meaning for post_title we need HTML tags so, post title needs HTML tags but not in all cases.
To provide semantic meaning to post title you must modify template file where it is being render instead of saving your time and modifying core. You can also use a metabox to display this code snippet on frontend and leaving title readable in dashboard.
#13
in reply to:
↑ 12
@
9 years ago
Replying to 5um17:
Replying to manojhl123:
Replying to 5um17:
Title mean to be have plain text. If someone uses it as textarea to display HTML then there is no difference between title field and content editor.
To provide semantic meaning for post_title we need HTML tags so, post title needs HTML tags but not in all cases.
To provide semantic meaning to post title you must modify template file where it is being render instead of saving your time and modifying core. You can also use a metabox to display this code snippet on frontend and leaving title readable in dashboard.
Using HTML tags (not all) in post title is provided form core itself, if you ever tested your theme with theme-unit-test data, a post is their with <strong> and <em> tags in post title. The reason for using this to provide semantic meaning in post titles too and helps a bit in SEO(little much, using semantics helps a lot in SEO)..
Inside admin panel you don't need to provide the semantic meaning for anything because it will not be exposed to world. so what I am asking is strip these HTML tags inside Admin panel and allow these tags in front-end....
#14
@
9 years ago
- Focuses administration added
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from reopened to closed
Hi manojhl123,
This ticket has been closed as invalid by a lead developer, core committer, and now me. Feel free to continue the discussion if you wish to, but please do not reopen the ticket.
This file shows the error