Opened 3 months ago
Last modified 3 months ago
#23756 new defect (bug)
make_clickable should not convert the URLs in pre,code tags
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Formatting | Version: | 3.5.1 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | nashwan.doaqan@… |
Description
Hi , Maybe it's a duplicate ticket but I tried to search in history.
Anyway , The purpose of this ticket is to have a clean snippet code posts .. for now it's hard to do it by plug-in .. and many people remove make_clickable filter at all !
So let's make it possible in 3.6 :)
Attachments (1)
Change History (9)
comment:3
follow-up:
↓ 4
alexvorn2
— 3 months ago
does this function is used when displaying the post? -> the_content()
comment:5
in reply to:
↑ 4
;
follow-up:
↓ 7
SergeyBiryukov
— 3 months ago
Replying to alex-ye:
Replying to alexvorn2:
does this function is used when displaying the post? -> the_content()
Yes
No, it isn't: #18214.
The purpose of this ticket is to have a clean snippet code posts
make_clickable() is only applied to comment_text() by default:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/default-filters.php#L151
comment:6
follow-up:
↓ 8
SergeyBiryukov
— 3 months ago
Making it skip <pre> and <code> tags might still be a good idea though, if it doesn't have a noticeable effect on performance.
comment:7
in reply to:
↑ 5
alex-ye
— 3 months ago
Replying to SergeyBiryukov:
No, it isn't: #18214.
Thank you for correction , I make sure that a plugin who adds the make_clickable to the_content filter ..
comment:8
in reply to:
↑ 6
alex-ye
— 3 months ago
Replying to SergeyBiryukov:
Making it skip <pre> and <code> tags might still be a good idea though, if it doesn't have a noticeable effect on performance.
Yes , I face problems in comments or topics/replies also in bbPress , I made my own hack to fix this but I think it is something the core should do .
The bug be bigger when you use a Syntax Highlighter plugins .
and who will say that I must escape the URLs before posting them so the make_clickable won't work , It's really hard and dirty solution !!
Many users don't do that and many users facing problems !! , I think we should not convert the URLs in pre,code tags at all !! , or at least make it easy by some hooks :)