Commit c31c934
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#9272
Discussed in: https://core.trac.wordpress.org/ticket/63694
Props dmsnell, jonsurrell, nerrad.
Fixes #63694.
git-svn-id: https://develop.svn.wordpress.org/trunk@60665 602fd350-edb4-49c9-b593-d223f7449a821 parent 85bfd1b commit c31c934
1 file changed
+8
-4
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 | | |
| |||
0 commit comments