Commit 15bc8a8
committed
HTML API: Reliably parse HTML in get_url_in_content()
As part of a larger effort in #63694, this utlizes `WP_HTML_Tag_Processor` instead of regex to parse the string passed into `get_url_in_content`.
As a benefit this also decodes the URL whereas the previous code didn’t, so strings like `http://` will be properly decoded as `http://`.
Developed in: WordPress/wordpress-develop#9272
Discussed in: https://core.trac.wordpress.org/ticket/63694
Props dmsnell, jonsurrell, nerrad.
Fixes #63694.
Built from https://develop.svn.wordpress.org/trunk@60665
git-svn-id: https://core.svn.wordpress.org/trunk@60001 1a063a9b-81f0-0310-95a4-ce76da25c4cd1 parent f26bef7 commit 15bc8a8
2 files changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5978 | 5978 | | |
5979 | 5979 | | |
5980 | 5980 | | |
5981 | | - | |
5982 | | - | |
| 5981 | + | |
| 5982 | + | |
5983 | 5983 | | |
5984 | 5984 | | |
5985 | 5985 | | |
5986 | 5986 | | |
5987 | 5987 | | |
5988 | 5988 | | |
5989 | | - | |
5990 | | - | |
| 5989 | + | |
| 5990 | + | |
| 5991 | + | |
| 5992 | + | |
| 5993 | + | |
| 5994 | + | |
5991 | 5995 | | |
5992 | 5996 | | |
5993 | 5997 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments