Andrew Ozz
4e7dd2c4b1
Formatting: maintain the content of HTML comments when they contain <object>
tags. Add more tests for wpaitop().
...
Props miqrogroove.
Fixes #33645 for trunk.
Built from https://develop.svn.wordpress.org/trunk@33955
git-svn-id: http://core.svn.wordpress.org/trunk@33924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 22:55:24 +00:00
John Blackbourn
bdde0261bc
Bail out early from esc_url()
if the URL becomes empty after stripping out disallowed characters.
...
Fixes #28015
Props jesin for the unit test
Built from https://develop.svn.wordpress.org/trunk@33923
git-svn-id: http://core.svn.wordpress.org/trunk@33892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 21:29:25 +00:00
John Blackbourn
6aad2eb98c
Correctly encode spaces in URLs passed to esc_url()
instead of removing them.
...
Fixes #23605
Props enshrined, johnbillion
Built from https://develop.svn.wordpress.org/trunk@33858
git-svn-id: http://core.svn.wordpress.org/trunk@33826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-02 17:20:21 +00:00
Scott Taylor
ef87172270
foreach
is a statement, not a function.
...
See #33491 .
Built from https://develop.svn.wordpress.org/trunk@33734
git-svn-id: http://core.svn.wordpress.org/trunk@33702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 20:28:22 +00:00
Scott Taylor
3982598305
Doc block for_wp_specialchars
: $quote_style
can also be string
('single' or 'double')
...
See #33491 .
Built from https://develop.svn.wordpress.org/trunk@33700
git-svn-id: http://core.svn.wordpress.org/trunk@33667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-21 18:36:24 +00:00
Andrew Ozz
2de7757124
Fix creating of extra <br />
tags in both PHP and JS variants of wpautop(). Add PHP tests to catch similar problems in the future.
...
Props valendesigns, azaozz. Fixes #33377 .
Built from https://develop.svn.wordpress.org/trunk@33624
git-svn-id: http://core.svn.wordpress.org/trunk@33591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-17 17:36:24 +00:00
Dominik Schilling
0e1476d078
Editor: word count: Remove indentation from the translator comment.
...
Avoids a duplicate comment in the POT file.
see #30966 .
Built from https://develop.svn.wordpress.org/trunk@33517
git-svn-id: http://core.svn.wordpress.org/trunk@33484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-30 17:08:24 +00:00
Scott Taylor
15a7d98ce6
Protect newlines inside of CDATA
. This was breaking things, notably inline JS that used comments for HTML standards compat.
...
* Tokenize newlines in `WP_Embed::autoembed()` before running `->autoembed_callback()`
* Tokenize newlines with placeholders in `wpautop()`
* Introduce `wp_html_split()` to DRY the RegEx from `wp_replace_in_html_tags()` and `do_shortcodes_in_html_tags()`
Adds unit tests.
Props miqrogroove, kitchin, azaozz.
Fixes #33106 .
Built from https://develop.svn.wordpress.org/trunk@33469
git-svn-id: http://core.svn.wordpress.org/trunk@33436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-28 23:03:24 +00:00
Ella Iseulde Van Dorpe
491c863f35
Editor: word count: better names for types.
...
Also fix it in wp_trim_words().
Fixes #30966 .
Built from https://develop.svn.wordpress.org/trunk@33440
git-svn-id: http://core.svn.wordpress.org/trunk@33407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-27 11:19:26 +00:00
Scott Taylor
d8e8ad4a2f
Pinking shears.
...
Built from https://develop.svn.wordpress.org/trunk@33411
git-svn-id: http://core.svn.wordpress.org/trunk@33379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-24 17:27:24 +00:00
Gary Pendergast
c3e0ed7e03
Shortcodes: Improve the reliablity of shortcodes inside HTML tags.
...
Props miqrogroove.
See #15694 .
Built from https://develop.svn.wordpress.org/trunk@33359
git-svn-id: http://core.svn.wordpress.org/trunk@33331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-22 05:15:25 +00:00
Scott Taylor
7c218ab59a
After [33148]:
...
Don't nest `esc_attr()` and `htmlspecialchars()` when escaping the post title on the edit post screen.
Unrevert parts of [32851] and [32850].
Adds/alters unit tests.
Props miqrogroove.
Fixes #17780 .
Built from https://develop.svn.wordpress.org/trunk@33271
git-svn-id: http://core.svn.wordpress.org/trunk@33243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-14 17:56:26 +00:00
Drew Jaynes
9e12c71872
Fix inline documentation syntax for two formatting functions added in 4.3.
...
* `wptexturize_primes()` See [32863]
* `format_for_editor()` See [32899]
See #32891 .
Built from https://develop.svn.wordpress.org/trunk@33225
git-svn-id: http://core.svn.wordpress.org/trunk@33197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 21:30:24 +00:00
Andrew Ozz
4bd5e2db01
TinyMCE:
...
- Go back to encoding the editor content only when TinyMCE is used.
- Add check and encode `</textarea>` if present.
See #32425 .
Built from https://develop.svn.wordpress.org/trunk@33187
git-svn-id: http://core.svn.wordpress.org/trunk@33159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 03:19:24 +00:00
Scott Taylor
6cc3a903d7
Revert [32851] and [32850] for now, tl;dr encoding issues.
...
See #17780 .
Built from https://develop.svn.wordpress.org/trunk@33148
git-svn-id: http://core.svn.wordpress.org/trunk@33120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-09 20:56:24 +00:00
Aaron Jorbin
91712711eb
Don't strip newline in esc_url() when protocol is mailto:
...
The mailto protocol is a bit different than the other protocols in that new lines are something you might realistically want to include. Includes tests to make sure that http protocol urls that contain mailto: aren't affected. Tests for stripping newlines in general already exist.
Fixes #31632
Props danielbachhuber
Built from https://develop.svn.wordpress.org/trunk@33064
git-svn-id: http://core.svn.wordpress.org/trunk@33035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 14:28:23 +00:00
Dominik Schilling
699dbedb03
l10n: Update wp_get_installed_translations()
to support variants of a language.
...
* A variant of a language has its own locale, for example the locale of the formal variant of German is `de_DE_formal`.
* Update `remove_accents()` and some CSS rules to support `de_DE_formal`.
* Add tests for `get_bloginfo( 'language' )`.
* API changes will be deployed over the next few days.
see #28303 .
Built from https://develop.svn.wordpress.org/trunk@33027
git-svn-id: http://core.svn.wordpress.org/trunk@32998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-01 15:43:24 +00:00
Konstantin Obenland
c56a8ae0f7
Introducing Site Icon, favicon management for WordPress.
...
This v1 marries Jetpack's Site Icon module with the Media Modal, reusing code
from the Custom Header admin. For now, the core-provided icons will be limited
to a favicon, an iOS app icon, and a Windows tile icon, leaving `.ico` support
and additional icons to plugins to add.
Props obenland, tyxla, flixos90, jancbeck, markjaquith, scruffian.
See #16434 .
Built from https://develop.svn.wordpress.org/trunk@32994
git-svn-id: http://core.svn.wordpress.org/trunk@32965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-29 12:58:25 +00:00
Andrew Ozz
eaadfde950
Define SCRIPT_DEBUG
early on every load, similarly to WP_DEBUG
. Remove defined( 'SCRIPT_DEBUG' )
checks.
...
Fixes #32333 .
Built from https://develop.svn.wordpress.org/trunk@32935
git-svn-id: http://core.svn.wordpress.org/trunk@32906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-25 02:29:31 +00:00
Andrew Ozz
baa8e833ff
Fix typo/white space in the docs.
...
See #32425 .
Built from https://develop.svn.wordpress.org/trunk@32900
git-svn-id: http://core.svn.wordpress.org/trunk@32871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 22:08:28 +00:00
Andrew Ozz
e4758f42e5
Update the TinyMCE initialization:
...
- Replace `wp_htmledit_pre()` and `wp_richedit_pre()` with `format_for_editor()`.
- Replace the `'htmledit_pre'` and `'richedit_pre'` filters with `'format_for_editor'`.
- Do not run the post content through `wpautop()` in PHP when the visual editor is default. Run the textarea content through the JS wpautop on initializing TinyMCE.
- Simplify both editors initialization.
- Improve setting of `wpActiveEditor` in Quicktags.
- Improve editor.js, use `tinymce.$` when possible.
See #32425 .
Built from https://develop.svn.wordpress.org/trunk@32899
git-svn-id: http://core.svn.wordpress.org/trunk@32870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 22:01:28 +00:00
Dominik Schilling
4423739c65
Use 3-digit x.x.x style for 4.3.0
@since versions.
...
see #32335 , #32430 .
Built from https://develop.svn.wordpress.org/trunk@32897
git-svn-id: http://core.svn.wordpress.org/trunk@32868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 11:41:26 +00:00
Andrew Ozz
b9a4fefb08
Update convert_chars():
...
- Stop trying to remove `<title>` and `<category>` meta tags. They have not been used for many many years.
- Replacement of `<br>` with `<br />` and `<hr>` with `<hr />` is not needed for HTML 5.0. Also, these tags are formatted like that by the visual editor.
- Replace invalid HTML entities that might be pasted in the Text editor on save instead of on display.
Fixes #32335 .
Built from https://develop.svn.wordpress.org/trunk@32896
git-svn-id: http://core.svn.wordpress.org/trunk@32867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 00:59:26 +00:00
Scott Taylor
777d3ba7e2
wptexturize()
improvements:
...
* Make sure that strings ending with a number and quotation mark get the proper smart quotes
* Introduce `wptexturize_primes()`, a logic tree to determine whether or not "7'." represents seven feet, then converts the special char into either a prime char or a closing quote char.
Adds unit tests.
Props miqrogroove.
Fixes #29256 .
Built from https://develop.svn.wordpress.org/trunk@32863
git-svn-id: http://core.svn.wordpress.org/trunk@32834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 20:06:25 +00:00
Andrew Ozz
503b80be0b
Fix using htmlspecialchars()
whit the $double_encode
parameter. PHP < 5.4 doesn't validate the entities.
...
Props miqrogroove. Fixes #17780 .
Built from https://develop.svn.wordpress.org/trunk@32851
git-svn-id: http://core.svn.wordpress.org/trunk@32822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 01:53:26 +00:00
Scott Taylor
d8c93a081d
Since PHP 5.2.3, the htmlspecialchars()
function has an optional $double_encode
parameter, which we can now use. This will save us a few expensive kses/html decoding calls.
...
Adds unit tests.
Props miqrogroove.
Fixes #17780 .
Built from https://develop.svn.wordpress.org/trunk@32850
git-svn-id: http://core.svn.wordpress.org/trunk@32821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 22:00:26 +00:00
Scott Taylor
5c6b63d3a6
if
is a statment, not a function.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32800
git-svn-id: http://core.svn.wordpress.org/trunk@32771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 20:01:25 +00:00
Scott Taylor
efbb8fa4e5
Document the default list of allowed protocols in the doc block for wp_allowed_protocols()
and cross-reference in esc_url()
and the kses_allowed_protocols
filter.
...
Props GunGeekATX.
Fixes #32421 .
Built from https://develop.svn.wordpress.org/trunk@32797
git-svn-id: http://core.svn.wordpress.org/trunk@32768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 19:45:26 +00:00
Scott Taylor
362704ab9a
sanitize_option()
needs to handle WP_Error
. DRY the conditional calls to add_settings_error()
.
...
Props chriscct7 for an initial patch.
Fixes #32350 .
Built from https://develop.svn.wordpress.org/trunk@32791
git-svn-id: http://core.svn.wordpress.org/trunk@32762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 01:29:27 +00:00
Scott Taylor
8df67cb188
Add a note to wptexturize()
docs.
...
Props miqrogroove.
Fixes #32521 .
Built from https://develop.svn.wordpress.org/trunk@32790
git-svn-id: http://core.svn.wordpress.org/trunk@32761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 00:57:24 +00:00
Scott Taylor
2043805da4
Improve the consistency of punctuation matching in wptexturize()
.
...
Adds unit tests.
Props miqrogroove.
Fixes #31886 .
Built from https://develop.svn.wordpress.org/trunk@32789
git-svn-id: http://core.svn.wordpress.org/trunk@32760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 00:50:25 +00:00
Scott Taylor
7db2c06ab6
Allow 'Cockney' filter to be translated.
...
Updates unit test.
Props miqrogroove.
Fixes #31953 .
Built from https://develop.svn.wordpress.org/trunk@32788
git-svn-id: http://core.svn.wordpress.org/trunk@32759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-16 00:46:24 +00:00
Scott Taylor
19a3aacc94
Add @static*
annotations where they are missing.
...
Initialize all static vars that are not, most to `null`.
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32650
git-svn-id: http://core.svn.wordpress.org/trunk@32620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 15:43:29 +00:00
Drew Jaynes
4c37f68b79
Fix inline documentation syntax in wp_xmlrpc_server
.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@32591
git-svn-id: http://core.svn.wordpress.org/trunk@32561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-25 06:25:25 +00:00
Boone Gorges
33b99991a8
In sanitize_option()
, pass the unsanitized $value
to the filter.
...
Props simonwheatley, MikeHansenMe.
Fixes #26199 .
Built from https://develop.svn.wordpress.org/trunk@32520
git-svn-id: http://core.svn.wordpress.org/trunk@32490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-21 18:00:26 +00:00
Andrew Ozz
9ecaba2688
Check if running from /src or SCRIPT_DEBUG is defined in print_emoji_detection_script()
.
...
See #32118 .
Built from https://develop.svn.wordpress.org/trunk@32482
git-svn-id: http://core.svn.wordpress.org/trunk@32452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-10 18:24:30 +00:00
Andrew Ozz
4e971bea9f
Emoji:
...
- Fix loading errors in IE9 and IE10.
- Add fallbacks for the loading events.
Fixes #32109 for trunk.
Built from https://develop.svn.wordpress.org/trunk@32334
git-svn-id: http://core.svn.wordpress.org/trunk@32305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-03 18:45:29 +00:00
Sergey Biryukov
89bf126626
Check if SCRIPT_DEBUG
is defined before using it in print_emoji_detection_script()
.
...
props Craig Ralston.
fixes #32118 for trunk.
Built from https://develop.svn.wordpress.org/trunk@32296
git-svn-id: http://core.svn.wordpress.org/trunk@32267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-26 10:36:28 +00:00
Gary Pendergast
f32bbeeb95
Clean up some edge cases in sanitize_sql_orderby()
.
...
Props vortfu, dd32.
Built from https://develop.svn.wordpress.org/trunk@32164
git-svn-id: http://core.svn.wordpress.org/trunk@32139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-20 05:42:25 +00:00
Andrew Nacin
7f1b31f80f
Clean up wp_staticize_emoji() and friends.
...
* DOMDocument was removed in [31752] but not the check.
* wp_staticize_emoji() has never accepted a second arg; remove it from calls.
* Remove wp_staticize_emoji_for_feeds(), no need for it.
* Remove _ and @ignore from wp_staticize_emoji_for_email(), no need for it.
see #31242 .
Built from https://develop.svn.wordpress.org/trunk@32161
git-svn-id: http://core.svn.wordpress.org/trunk@32136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-20 04:15:26 +00:00
Gary Pendergast
5a547231b7
Emoji: The emoji JS files should be run through the script_loader_src
filter, as they would be if they were registered scripts.
...
Props peterwilsoncc.
Fixes #31938 .
Built from https://develop.svn.wordpress.org/trunk@32097
git-svn-id: http://core.svn.wordpress.org/trunk@32076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-09 11:07:28 +00:00
Gary Pendergast
dcf2710bc9
Emoji: Tidy up the wp_encode_emoji()
regex, and clarify the function comment on Unicode 8 support.
...
Built from https://develop.svn.wordpress.org/trunk@32096
git-svn-id: http://core.svn.wordpress.org/trunk@32075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-09 04:37:30 +00:00
Drew Jaynes
82e4990b73
Various docs syntax fixes in wp-includes/formatting.php.
...
See #31888 .
Built from https://develop.svn.wordpress.org/trunk@32039
git-svn-id: http://core.svn.wordpress.org/trunk@32018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-05 15:51:27 +00:00
Gary Pendergast
2b7efe5c86
Emoji: [31938] forgot a /
in the emoji CDN URL.
...
See #31651 .
Built from https://develop.svn.wordpress.org/trunk@31977
git-svn-id: http://core.svn.wordpress.org/trunk@31956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-02 00:11:27 +00:00
Scott Taylor
8ec192ce1f
Alter the regex in wptexturize()
to properly handle input like: <> "Hello world" <>
.
...
Updates unit test data.
Props miqrogroove.
Fixes #30344 .
Built from https://develop.svn.wordpress.org/trunk@31965
git-svn-id: http://core.svn.wordpress.org/trunk@31944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 19:09:28 +00:00
Gary Pendergast
486e80bdf5
Emoji: Change the emoji CDN to w.org, from wp.com.
...
See #31651 .
Built from https://develop.svn.wordpress.org/trunk@31938
git-svn-id: http://core.svn.wordpress.org/trunk@31917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-31 04:31:29 +00:00
Gary Pendergast
3ddbef69e3
Emoji: When encoding emoji into HTML entities, 0 was being incorrectly trimmed from the right side of the hex string, causing some characters to be encoded incorrectly.
...
Built from https://develop.svn.wordpress.org/trunk@31926
git-svn-id: http://core.svn.wordpress.org/trunk@31905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 03:27:31 +00:00
Gary Pendergast
31db5d08fe
Emoji: When staticizing emoji into <img>
tags, include an alt
attribute of the original Emoji, to match both Smiley and Twemoji <img>
tags.
...
Built from https://develop.svn.wordpress.org/trunk@31924
git-svn-id: http://core.svn.wordpress.org/trunk@31903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 03:09:26 +00:00
Gary Pendergast
bfb9990548
Emoji: [31864] changed emoji image's inline style from height
to max-height
. Unfortunately, anything using feedparser.py
(for example, NewsBlur) strips out max-height
, which gives us massive emoji in feeds.
...
This re-adds `height`, and also reminds us why we can't have nice things.
See #31719 .
Built from https://develop.svn.wordpress.org/trunk@31909
git-svn-id: http://core.svn.wordpress.org/trunk@31888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-27 02:12:28 +00:00
Gary Pendergast
1c6b1b3414
Emoji: Add a comment to print_emoji_detection_script()
explaining how the include
statement works as part of the grunt build
process.
...
See #31701 .
Built from https://develop.svn.wordpress.org/trunk@31881
git-svn-id: http://core.svn.wordpress.org/trunk@31860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-25 04:09:26 +00:00
Gary Pendergast
b53b12ff8c
Emoji: Instead of loading the emoji JS files automatically, we now include a small JS shim in the header, to test if the user's browser needs Twemoji. It then loads the emoji JS files only if they're needed.
...
Props pento, azaozz.
Fixes #31701 .
Built from https://develop.svn.wordpress.org/trunk@31875
git-svn-id: http://core.svn.wordpress.org/trunk@31854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-24 23:33:32 +00:00
Gary Pendergast
3b863ae173
Emoji: Gmail doesn't obey an <img>
's inline CSS height
rule, transforming it to min-height
. To avoid giant smiley faces everywhere, we're changing the height
rule to max-height
, which Gmail plays nicer with.
...
Props janhenckens.
Fixes #31719 .
Built from https://develop.svn.wordpress.org/trunk@31864
git-svn-id: http://core.svn.wordpress.org/trunk@31843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-23 12:08:26 +00:00
Gary Pendergast
69de85fd48
Emoji: Set the emoji image protocol with set_url_scheme()
, instead of defaulting to HTTPS.
...
Props extendwings.
Fixes #31735 .
Built from https://develop.svn.wordpress.org/trunk@31861
git-svn-id: http://core.svn.wordpress.org/trunk@31840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-23 02:11:28 +00:00
Gary Pendergast
73b92df912
Emoji: When we're replacing emoji with <img>
s in email, we can only do that if the Content-Type is text/html - otherwise, they'll show up in the email as the HTML string.
...
Fixes #31720
Built from https://develop.svn.wordpress.org/trunk@31860
git-svn-id: http://core.svn.wordpress.org/trunk@31839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-22 23:16:28 +00:00
Drew Jaynes
bb3ca077ce
Add more verbose inline documentation inside of wpautop()
to more clearly explain what's going on.
...
Props ericlewis, johneckman, azaozz.
Fixes #31041 .
Built from https://develop.svn.wordpress.org/trunk@31852
git-svn-id: http://core.svn.wordpress.org/trunk@31831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-20 19:47:27 +00:00
Gary Pendergast
fd2e5d66e7
When converting emoji in email to static images, check that the message is defined, otherwise we could cause PHP warnings.
...
Props nerrad.
Fixes #31708 .
Built from https://develop.svn.wordpress.org/trunk@31847
git-svn-id: http://core.svn.wordpress.org/trunk@31827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-20 12:32:26 +00:00
Gary Pendergast
a97462e755
Emoji: Rename the email and feed filter functions to be _
prefixed, and @ignore
-d in the PHPDocs.
...
See #31242
Built from https://develop.svn.wordpress.org/trunk@31791
git-svn-id: http://core.svn.wordpress.org/trunk@31773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-16 10:46:26 +00:00
Sergey Biryukov
756e445a53
Fix typo in a comment in [31752].
...
see #31242 .
Built from https://develop.svn.wordpress.org/trunk@31790
git-svn-id: http://core.svn.wordpress.org/trunk@31770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-16 01:56:27 +00:00
Drew Jaynes
f50307c5d8
Clean up some inline documentation for emoji functionality, including a missing @since
for mail_emoji()
, and a changelog entry for wp_insert_post()
.
...
See #31242 .
Built from https://develop.svn.wordpress.org/trunk@31789
git-svn-id: http://core.svn.wordpress.org/trunk@31769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-16 01:43:28 +00:00
Andrew Ozz
a7fd4a3774
Emoji:
...
- Add the styling for the replacement images to the admin CSS.
- Revert to using `.emoji` as replacement image class.
- When pasting in the editor, convert emoji images to our format so we can replace them with chars on saving.
- Some more clean up of both the plugin and wp-emoji.js.
See #31242 .
Built from https://develop.svn.wordpress.org/trunk@31786
git-svn-id: http://core.svn.wordpress.org/trunk@31766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 23:16:29 +00:00
Gary Pendergast
ac61ac62cd
Smilies: The new smilies added in [31733] and [31745] are larger than the old smilies. While this is taken care of by the CSS on normal pages, it means they're disproportionally large when seen in RSS and email.
...
By adding a little bit of inline style to them, we get pleasingly sized smilies everywhere. :-)
See #31242
Built from https://develop.svn.wordpress.org/trunk@31781
git-svn-id: http://core.svn.wordpress.org/trunk@31761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 11:41:27 +00:00
Sergey Biryukov
ac90f66250
Emoji and smiley images should be displayed inline.
...
see #31242 .
Built from https://develop.svn.wordpress.org/trunk@31771
git-svn-id: http://core.svn.wordpress.org/trunk@31751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-13 18:45:27 +00:00
Gary Pendergast
351ea2d6f8
Emoji: There's a little tear in my eye as I remove DOMDocument from the Emoji staticizer. It was a beautiful dream, but it wasn't to be.
...
Instead, let's use the tried and trusted smiley replacement algorithm, which has stood the test of time.
See #31242
Built from https://develop.svn.wordpress.org/trunk@31752
git-svn-id: http://core.svn.wordpress.org/trunk@31733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 13:17:26 +00:00
Gary Pendergast
03ade8c011
Add emoji URL support, and Twemoji fallback for displaying slugs in wp-admin, when the browser doesn't natively support emoji.
...
Props pento, SergeyBiryukov and boonebgorges.
Fixes #31328
Built from https://develop.svn.wordpress.org/trunk@31734
git-svn-id: http://core.svn.wordpress.org/trunk@31715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:55:28 +00:00
Gary Pendergast
46e2a65cf1
Add emoji support, with Twemoji fallback.
...
Replace exisiting smilies with equivalent emoji, or with shiny new smiley images where no emoji existed.
Props batmoo, joen and mkaz for the original plugin upon which this is based.
Props pento, iseulde, kraftbj and peterwilsoncc for making the internet's dreams come true.
See #31242
Built from https://develop.svn.wordpress.org/trunk@31733
git-svn-id: http://core.svn.wordpress.org/trunk@31714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:49:28 +00:00
Scott Taylor
b4869ed42f
Avoid function calls on each iteration of a for
loop.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31678
git-svn-id: http://core.svn.wordpress.org/trunk@31659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-08 23:01:26 +00:00
Scott Taylor
7cb45f2402
Don't call the size function count()
as part of a test condition in loops. Compute the size beforehand, and not on each iteration.
...
Scrutinizer added a Performance label: these are the only violations.
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31554
git-svn-id: http://core.svn.wordpress.org/trunk@31535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 05:48:24 +00:00
Gary Pendergast
109d87363d
Texturize: Add "em" as a cockney term, so that "'em" is texturized with an apostrophe, instead of an open quote.
...
Fixes #29813 .
Props miqrogroove.
Built from https://develop.svn.wordpress.org/trunk@31249
git-svn-id: http://core.svn.wordpress.org/trunk@31230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-20 18:44:26 +00:00
Gary Pendergast
d0c327443c
When a hyphen -
or double hyphen --
was at the start or the end of a string, it wasn't texturized correctly.
...
Fixes #31030
Built from https://develop.svn.wordpress.org/trunk@31199
git-svn-id: http://core.svn.wordpress.org/trunk@31180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 03:54:24 +00:00
Scott Taylor
6b84df3bbd
Ensure that <figcaption>
is not autop'd.
...
Fixes #29219 .
Built from https://develop.svn.wordpress.org/trunk@31186
git-svn-id: http://core.svn.wordpress.org/trunk@31167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 00:27:21 +00:00
Scott Taylor
5547115dc2
Fix some @param
docs that have chars too close them.
...
Add `@property` annotations to `WP_User` and `WP_Post`.
Remove erroneous `@param`s from image editor class methods.
Officially add the property `$_column_headers` to `WP_List_Table`.
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31127
git-svn-id: http://core.svn.wordpress.org/trunk@31108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 06:57:22 +00:00
Scott Taylor
60b0cd7943
The keyword elseif
should be used instead of else if
so that all control keywords look like single words.
...
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs.
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31090
git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Scott Taylor
ac4e67b82e
Perl-style comments should not be used
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31079
git-svn-id: http://core.svn.wordpress.org/trunk@31060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 05:52:24 +00:00
Gary Pendergast
c20f6afb05
Options: When updating options, make sure the user isn't trying to insert characters that aren't supported by the database character set.
...
See #30361 .
Built from https://develop.svn.wordpress.org/trunk@31064
git-svn-id: http://core.svn.wordpress.org/trunk@31045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-07 04:15:23 +00:00
Scott Taylor
5eb5afac34
For clarity, initialize some arrays that previously were only assigned via short circuit in loops.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@30982
git-svn-id: http://core.svn.wordpress.org/trunk@30968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 22:47:22 +00:00
Dion Hulse
e0ac8c0386
In the links_add_base()
callback, use a HTTP-aware URL joining function, rather than a filesystem joining function to avoid PHP warnings on certain systems.
...
Fixes #29950
Built from https://develop.svn.wordpress.org/trunk@30766
git-svn-id: http://core.svn.wordpress.org/trunk@30756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 03:19:23 +00:00
Mark Jaquith
14b0899e57
Revert [28719] and no longer math-process multiplication of negative numbers
...
see #19308
fixes #30445
props rmccue
Built from https://develop.svn.wordpress.org/trunk@30752
git-svn-id: http://core.svn.wordpress.org/trunk@30742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-06 21:24:23 +00:00
Scott Taylor
e619abda6e
Improve various @param
docs for src/wp-includes/*
.
...
See #30224 .
Built from https://develop.svn.wordpress.org/trunk@30681
git-svn-id: http://core.svn.wordpress.org/trunk@30671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 01:34:24 +00:00
Dion Hulse
aba2a6bcfd
Fix the PHPDoc example for _split_str_by_whitespace().
...
Props voldemortensen. Fixes #30504
Built from https://develop.svn.wordpress.org/trunk@30575
git-svn-id: http://core.svn.wordpress.org/trunk@30565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-26 03:52:22 +00:00
Drew Jaynes
39da8dd15e
Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.
...
Affects DocBlocks for the following core elements in wp-includes/formatting.php:
* Markdown-indent code snippets in the description for `wptexturize()`
* Backtick-escape inline code in a parameter description for `_wptexturize_pushpop_element()`
* Backtick-escape inline code in the description for `shortcode_unautop()`
* Backtick-escape HTML tags in the description for `convert_chars()`
* Markdown-indent a code snippet in the description for `_split_str_by_whitespace()`
* Backtick-escape an `<img>` tag in the description for `translate_smiley()`
* Add markdown formatting to the description for `links_add_target()`
* Backtick-escape HTML tags in the description for `wp_strip_all_tags()`
Props rarst.
See #30473 .
Built from https://develop.svn.wordpress.org/trunk@30540
git-svn-id: http://core.svn.wordpress.org/trunk@30529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-24 05:30:25 +00:00
Drew Jaynes
2fda44cb77
Add an entry to the changelog for wp_make_link_relative()
noting that intentional support was added for relative URLs.
...
See #30373 .
Built from https://develop.svn.wordpress.org/trunk@30496
git-svn-id: http://core.svn.wordpress.org/trunk@30485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-21 03:44:23 +00:00
Andrew Nacin
6e2f41a2a3
Anchor texturize to shortcodes to improve regex efficiency.
...
props miqrogroove.
see #29557 for segfault issues.
Built from https://develop.svn.wordpress.org/trunk@30449
git-svn-id: http://core.svn.wordpress.org/trunk@30443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 14:28:23 +00:00
Boone Gorges
d95b5196cc
Improvements to wp_make_link_relative()
.
...
* Support relative URL input.
* When the URL being made relative has another URL as a parameter, don't make the second URL relative.
Props voldemortensen.
Fixes #30373 .
Built from https://develop.svn.wordpress.org/trunk@30383
git-svn-id: http://core.svn.wordpress.org/trunk@30380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-19 01:53:24 +00:00
Drew Jaynes
f8657d5890
Remove redundant and erroneous @uses
tag from most core inline documentation.
...
Per our inline documentation standards, no further use of the `@uses` tag is recommended as used and used-by relationships can be derived through other means. This removes most uses of the tag in core documentation, with remaining tags to be converted to `@global` or `@see` as they apply.
Fixes #30191 .
Built from https://develop.svn.wordpress.org/trunk@30105
git-svn-id: http://core.svn.wordpress.org/trunk@30105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-30 01:05:24 +00:00
Sergey Biryukov
20cfcbf86d
Fix whitespace issues in [29781]. Remove a redundant comment.
...
props miqrogroove.
see #29557 .
Built from https://develop.svn.wordpress.org/trunk@29873
git-svn-id: http://core.svn.wordpress.org/trunk@29632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-11 02:33:18 +00:00
Scott Taylor
37a0c36d38
The joys of wptexturize()
:
...
* Revert parts of [28773] and [28727] and [29748].
* Do not crash PHP. Make the shortcode quantifier possessive to avoid backtracks.
* Reduce backtracking in long HTML comments by 100x.
* Do not ignore unclosed HTML comments.
* Do not break unregistered shortcodes, e.g. `[hello attr="value"]`.
* Do not break HTML in shortcode attributes, e.g. `[hello attr="<"]`.
* Do not match for shortcodes when there is extra whitespace, e.g. `[ hello ]`.
* Add unit tests to show #12690 was not fully resolved.
* Tested PHP 5.2.4, 5.2.13, 5.4.32, and 5.5.8.
Adds/modifies unit tests.
Props miqrogroove.
See #29557 .
Built from https://develop.svn.wordpress.org/trunk@29781
git-svn-id: http://core.svn.wordpress.org/trunk@29553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 04:07:15 +00:00
Scott Taylor
0a848a6171
wptexturize()
improvements:
...
* Expand the `wptexturize()` RegEx to include the list of registered shortcodes.
* Avoid backtracking after `[` chars by not filtering params in registered shortcodes. This will cause escaped shortcodes and their params to become texturized if not registered.
* Registered shortcode params will never be texturized, even when escaped.
* Move all tests involving unregistered shortcodes to a new and improved unit.
* Update one test involving HTML within shortcode params.
Props miqrogroove.
See #29557 .
Built from https://develop.svn.wordpress.org/trunk@29748
git-svn-id: http://core.svn.wordpress.org/trunk@29520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-17 15:14:17 +00:00
Sergey Biryukov
93903a2a81
Check for [\r\n\t ] instead of \s in sanitize_file_name() to avoid UTF-8 issues.
...
props p_enrique.
fixes #26094 .
Built from https://develop.svn.wordpress.org/trunk@29715
git-svn-id: http://core.svn.wordpress.org/trunk@29489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-07 08:33:16 +00:00
Andrew Nacin
f7392ef917
Pinking shears.
...
Built from https://develop.svn.wordpress.org/trunk@29707
git-svn-id: http://core.svn.wordpress.org/trunk@29481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-04 15:23:16 +00:00
Andrew Nacin
9db108dbe0
Allow language specified by the WPLANG constant (but not installed) to be chosen.
...
fixes #29456 .
Built from https://develop.svn.wordpress.org/trunk@29691
git-svn-id: http://core.svn.wordpress.org/trunk@29466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-03 08:03:16 +00:00
Drew Jaynes
d33c807723
Fix some documentation typos in various core files.
...
Props vlajos.
Fixes #29199 .
Built from https://develop.svn.wordpress.org/trunk@29479
git-svn-id: http://core.svn.wordpress.org/trunk@29257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-13 03:56:17 +00:00
Scott Taylor
6b3251e931
wptexturize: After [28727], leverage RegeEx possessives (++) to improve performance and avoid libpcre segfaults.
...
Props kovshenin.
Fixes #12690 .
Built from https://develop.svn.wordpress.org/trunk@29431
git-svn-id: http://core.svn.wordpress.org/trunk@29209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-07 19:11:18 +00:00
Andrew Ozz
004da2f6ba
Formatting: make the removal of white space around <option> greedy, see #28217 .
...
Built from https://develop.svn.wordpress.org/trunk@29316
git-svn-id: http://core.svn.wordpress.org/trunk@29097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-28 19:55:16 +00:00
Andrew Ozz
ad0f539621
Formatting: no <p> or <br> around <option> tags in both flavours of wpautop, make "selects" easier to read in the Text editor. Fixes #28217 .
...
Built from https://develop.svn.wordpress.org/trunk@29315
git-svn-id: http://core.svn.wordpress.org/trunk@29096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-28 19:44:18 +00:00
Scott Taylor
a14f5b97d5
In sanitize_file_name()
, replace %20
and +
with dashes. Remove unnecessary code from _wp_handle_upload()
.
...
Adds unit tests.
Props ericmann.
Fixes #16330 .
Built from https://develop.svn.wordpress.org/trunk@29290
git-svn-id: http://core.svn.wordpress.org/trunk@29072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 22:09:16 +00:00
Drew Jaynes
c5a59037f1
Inline documentation cleanup for 4.0 audit.
...
Various improvements:
* Adds `@see` reference for `wp_list_comments()` in 'wp_list_comments_args' filter docs, added in [28285]
* Various phpDoc tweaks for the 'run_wptexturize' filter docs, added in [28715]
* Sentence and wrapping changes for `is_https_url()`, added in [28894]
* Documents the `$args` parameter for `wp_dropdown_languages()`, added in [29007]
* Adds a period to the parameter description for `_update_posts_count_on_delete()`, added in [28835]
* Documents a global in `is_customize_preview()`, added in [28999]
* phpDoc tweaks, adds an access modifier for `wpdb::esc_like()`, added in [28711]
See #28885 .
Built from https://develop.svn.wordpress.org/trunk@29163
git-svn-id: http://core.svn.wordpress.org/trunk@28947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-14 01:02:15 +00:00
Sergey Biryukov
8d358a16c3
Exclude a newline between delimeters from further checks in wptexturize() for better performance.
...
props miqrogroove.
fixes #28724 .
Built from https://develop.svn.wordpress.org/trunk@29008
git-svn-id: http://core.svn.wordpress.org/trunk@28796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-06 08:50:18 +00:00
Scott Taylor
5eb23f8e3c
Optimize regexp usage in wptexturize()
for a "3x Performance Boost."
...
Props miqrogroove.
See #28724 .
Built from https://develop.svn.wordpress.org/trunk@28986
git-svn-id: http://core.svn.wordpress.org/trunk@28775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 01:15:15 +00:00
John Blackbourn
fd2d2ebb2e
Correct typo in sanitize_html_class()
docblock.
...
Built from https://develop.svn.wordpress.org/trunk@28973
git-svn-id: http://core.svn.wordpress.org/trunk@28762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 16:58:16 +00:00
Sergey Biryukov
c6c1f56d60
Fix texturization of quotes when enclosed by angle brackets.
...
props miqrogroove.
fixes #28718 .
Built from https://develop.svn.wordpress.org/trunk@28971
git-svn-id: http://core.svn.wordpress.org/trunk@28760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 16:22:14 +00:00
Scott Taylor
a71d57da0a
Remove obsolete comment in wptexturize()
.
...
http://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2014-06-30&sort=asc#m879104
See [28831].
Built from https://develop.svn.wordpress.org/trunk@28929
git-svn-id: http://core.svn.wordpress.org/trunk@28727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 17:59:14 +00:00
Scott Taylor
9997f77d7f
Use less greedy regex in wptexturize()
. Adds unit tests.
...
Props miqrogroove.
See #28564 .
Built from https://develop.svn.wordpress.org/trunk@28852
git-svn-id: http://core.svn.wordpress.org/trunk@28656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 17:15:14 +00:00
Scott Taylor
8c39368644
Optimize the wptexturize()
loop:
...
* Take the ampersand pattern out of the loop for speed.
* Fix old bugs in the ampersand pattern.
* Refactor `_wptexturize_pushpop_element()` without PCRE for speed.
* Update unit tests.
Props miqrogroove.
Fixes #28623 .
Built from https://develop.svn.wordpress.org/trunk@28831
git-svn-id: http://core.svn.wordpress.org/trunk@28635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-25 17:49:14 +00:00
Scott Taylor
856e5ef55e
Remove noscript
from wpautop()
's list of block elements.
...
Props mdawaffe.
Fixes #27268 .
Built from https://develop.svn.wordpress.org/trunk@28817
git-svn-id: http://core.svn.wordpress.org/trunk@28624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-24 00:54:17 +00:00
Sergey Biryukov
8b272f4379
Remove mbstring_binary_safe_strlen(). Use mbstring_binary_safe_encoding() and reset_mbstring_encoding() directly.
...
fixes #28162 .
Built from https://develop.svn.wordpress.org/trunk@28808
git-svn-id: http://core.svn.wordpress.org/trunk@28617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-23 22:21:15 +00:00
Sergey Biryukov
9ceb642b2a
Introduce a binary-safe wrapper for strlen() and use it in seems_utf8(), utf8_uri_encode(), and wp_read_image_metadata().
...
Use binary-safe POMO_Reader::strlen() in MO::export_to_file_handle().
fixes #28162 .
Built from https://develop.svn.wordpress.org/trunk@28806
git-svn-id: http://core.svn.wordpress.org/trunk@28615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-23 14:48:14 +00:00
Sergey Biryukov
64e67b0dbb
Revert [28776] and use a correct variable instead.
...
props miqrogroove.
fixes #28575 .
Built from https://develop.svn.wordpress.org/trunk@28802
git-svn-id: http://core.svn.wordpress.org/trunk@28611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-22 22:13:16 +00:00
Sergey Biryukov
ce0d1a026c
Move preg_match() that should only run once out of the loop.
...
props dllh.
fixes #28575 .
Built from https://develop.svn.wordpress.org/trunk@28776
git-svn-id: http://core.svn.wordpress.org/trunk@28589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-19 00:01:16 +00:00
Scott Taylor
b2f6e1f674
In wptexturize()
+ tests:
...
* Allow well-formed HTML inside of shortcode attributes
* Restrict recursion. HTML is allowed but ignored.
* Do not allow exotic HTML comments in shortcode attributes.
* Continue to ignore the [ and ] chars if they appear in any HTML attribute.
* Update related regex patterns.
* Update unit tests.
Props miqrogroove.
Fixes #28564 .
Built from https://develop.svn.wordpress.org/trunk@28773
git-svn-id: http://core.svn.wordpress.org/trunk@28586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-18 19:49:15 +00:00
Scott Taylor
f1a15dd4fe
Fix abbreviations mixed with quotes, example: '99% of people'
.
...
Add/alter unit tests.
Props miqrogroove.
Fixes #26850 .
Built from https://develop.svn.wordpress.org/trunk@28765
git-svn-id: http://core.svn.wordpress.org/trunk@28578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-17 20:19:14 +00:00
Scott Taylor
2bac3b660f
In wptexturize()
, adjust for the treatment of abbreviated years at the end of quotations.
...
Silence some unit tests that have never passed and may no longer be applicable.
Props miqrogroove.
Fixes #18549 .
Built from https://develop.svn.wordpress.org/trunk@28764
git-svn-id: http://core.svn.wordpress.org/trunk@28577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-17 20:14:15 +00:00
Scott Taylor
3b3fb72ce3
Add unit tests to confirm that ---
is properly converted to —
by wptexturize()
where appropriate.
...
Props miqrogroove.
Fixes #28483 .
Built from https://develop.svn.wordpress.org/trunk@28763
git-svn-id: http://core.svn.wordpress.org/trunk@28576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-17 18:07:14 +00:00
Scott Taylor
f7ac0eed90
Add Unit Tests for i18n and wptexturize()
. Don't confuse closing single quotes and apostrophes.
...
See #27426 .
Built from https://develop.svn.wordpress.org/trunk@28762
git-svn-id: http://core.svn.wordpress.org/trunk@28575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-17 17:57:14 +00:00
Scott Taylor
337e5f7ae4
wptexturize()
adjustments:
...
* Only place an apostrophe before a number when it has exactly two digits.
* Never match '99' with the single prime pattern.
* Always assume '99' is an abbreviated year at the end of a quotation.
* Add unit tests.
* Resolves the unit test broken in [28721] for #8775 .
See #26850 .
Built from https://develop.svn.wordpress.org/trunk@28761
git-svn-id: http://core.svn.wordpress.org/trunk@28574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-17 17:41:15 +00:00
Scott Taylor
658170b179
In wptexturize()
, ensure that texturization does not corrupt contents of HTML elements, HTML comments, and smartcode attributes.
...
Adds a variety of unit tests/assertions.
Props miqrogroove.
Fixes #12690 , #8912 , #27602 .
Built from https://develop.svn.wordpress.org/trunk@28727
git-svn-id: http://core.svn.wordpress.org/trunk@28541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 14:34:13 +00:00
Scott Taylor
4c067bd327
In wptexturize()
, allow dashes before and after curly quotes. Example: This is what she said---"Wow that is cool."
...
Adds unit tests.
Props adamsilverstein, miqrogroove.
Fixes #20342 .
Built from https://develop.svn.wordpress.org/trunk@28726
git-svn-id: http://core.svn.wordpress.org/trunk@28540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 14:22:15 +00:00
Scott Taylor
3d3c166f11
wptexturize()
should handle apostrophes before primes.
...
Props nacin, miqrogroove.
Fixes #22823 .
Built from https://develop.svn.wordpress.org/trunk@28725
git-svn-id: http://core.svn.wordpress.org/trunk@28539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 14:14:17 +00:00
Drew Jaynes
5755eaf372
Improve inline documentation for the wp_spaces_regexp
filter.
...
Fixes #27588 .
Built from https://develop.svn.wordpress.org/trunk@28724
git-svn-id: http://core.svn.wordpress.org/trunk@28538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 06:46:15 +00:00
Drew Jaynes
0290f79eac
Add inline documentation for the run_wptexturize
filter.
...
Props miqrogroove for the original patch.
Fixes #19550 .
Built from https://develop.svn.wordpress.org/trunk@28723
git-svn-id: http://core.svn.wordpress.org/trunk@28537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 06:29:14 +00:00
Scott Taylor
f8b03aa528
Fix curly quotes around numbers when applicable.
...
Adds unit tests.
Props filosofo, mrmist, aliso, MikeHansenMe, miqrogroove.
Fixes #8775 .
Built from https://develop.svn.wordpress.org/trunk@28721
git-svn-id: http://core.svn.wordpress.org/trunk@28535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 02:43:14 +00:00
Scott Taylor
4666c1abe2
In wptexturize()
, don't convert C-style hexadecimals to mathematical ×
.
...
Adds unit tests.
Props harrym, kurtpayne, miqrogroove.
Fixes #19308 .
Built from https://develop.svn.wordpress.org/trunk@28719
git-svn-id: http://core.svn.wordpress.org/trunk@28533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 02:18:15 +00:00
Scott Taylor
12e7d6744b
In wptexturize()
, treat
like whitespace when texturizing hyphens.
...
Adds unit tests.
Props redsweater, miqrogroove.
Fixes #23185 .
Built from https://develop.svn.wordpress.org/trunk@28718
git-svn-id: http://core.svn.wordpress.org/trunk@28532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 02:09:15 +00:00
Scott Taylor
6cb51c9ceb
smilies_init()
, treat
like whitespace when converting smilies.
...
Adds unit tests.
Props miqrogroove.
Fixes #27587 .
Built from https://develop.svn.wordpress.org/trunk@28717
git-svn-id: http://core.svn.wordpress.org/trunk@28531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 02:03:14 +00:00
Scott Taylor
66d2144e9a
Ensure that shortcode_unautop()
treats
like whitespace.
...
`shortcode_unautop()` and `wptexturize()` now use `wp_spaces_regexp()` instead of raw regex.
Adds unit tests.
Props miqrogroove.
See #27588 .
Built from https://develop.svn.wordpress.org/trunk@28716
git-svn-id: http://core.svn.wordpress.org/trunk@28530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 01:55:15 +00:00
Scott Taylor
b4b0efe701
Add a $run_texturize
static var to wptexturize()
that is filterable via a new run-once filter: 'run_wptexturize'
. Allows user to disable texturization.
...
Needs filter docs.
Props nacin, SergeyBiryukov.
See #19550 .
Built from https://develop.svn.wordpress.org/trunk@28715
git-svn-id: http://core.svn.wordpress.org/trunk@28529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 01:46:14 +00:00
Scott Taylor
82bdc78500
LIKE
escape sanity:
...
* Deprecate `like_escape()`
* Add a method to `$wpdb`, `->esc_like()`, and add unit tests
`$wpdb::esc_like()` is not used yet. As such, many unit tests will throw `Unexpected deprecated notice for like_escape`. Subsequent commits will alleviate this.
Props miqrogroove.
See #10041 .
Built from https://develop.svn.wordpress.org/trunk@28711
git-svn-id: http://core.svn.wordpress.org/trunk@28527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-10 00:30:15 +00:00
Scott Taylor
46f82b03e7
Add a function: wp_spaces_regexp()
. It is not used yet.
...
This function is required by a bunch of patches by miqrogroove. Needs filter docs.
Props miqrogroove.
See #27588 .
Built from https://develop.svn.wordpress.org/trunk@28708
git-svn-id: http://core.svn.wordpress.org/trunk@28524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-09 19:30:14 +00:00
Sergey Biryukov
c20cdfcc38
Add a filter to human_time_diff().
...
props slimndap.
fixes #27271 .
Built from https://develop.svn.wordpress.org/trunk@28670
git-svn-id: http://core.svn.wordpress.org/trunk@28488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-05 00:39:14 +00:00
Sergey Biryukov
5c2d25aa77
Filter out empty and duplicate values in Comment Moderation and Comment Blacklist settings.
...
props GaVrA.
fixes #23800 .
Built from https://develop.svn.wordpress.org/trunk@28444
git-svn-id: http://core.svn.wordpress.org/trunk@28271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-16 11:10:14 +00:00
Andrew Nacin
cfa2246cc7
Add braces to wptexturize() after [27839]. see #22692 .
...
Built from https://develop.svn.wordpress.org/trunk@27844
git-svn-id: http://core.svn.wordpress.org/trunk@27678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 09:00:15 +00:00
Andrew Nacin
d04cd4147a
Texturize: Massive performance improvements (~600% faster); better handling of nbsp, double, and weird spaces; 136 new unit tests.
...
big props miqrogroove.
fixes #22692 .
Built from https://develop.svn.wordpress.org/trunk@27839
git-svn-id: http://core.svn.wordpress.org/trunk@27673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 07:16:16 +00:00
Andrew Nacin
2133c89e8f
Remove select and input from wpautop()'s HTML blocks list.
...
props rachelbaker, DH-Shredder.
fixes #22230 .
Built from https://develop.svn.wordpress.org/trunk@27761
git-svn-id: http://core.svn.wordpress.org/trunk@27598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 00:01:15 +00:00
Scott Taylor
0f55595472
In sanitize_file_name()
, replace a UTF-8-encoded Unicode representation of a non-breaking space (\u00a0
/ \xc2\xa
) with an old-fashioned space:
.
...
Fixes #27281 .
Built from https://develop.svn.wordpress.org/trunk@27617
git-svn-id: http://core.svn.wordpress.org/trunk@27460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 07:16:15 +00:00
John Blackbourn
184dc2bc33
figcaption
should not be treated as a block-level element by wpautop()
. See #25646 . Props oso96_2000.
...
Built from https://develop.svn.wordpress.org/trunk@27527
git-svn-id: http://core.svn.wordpress.org/trunk@27370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 21:51:16 +00:00
John Blackbourn
8d7f96c459
Deprecate format_to_post()
and remove its filter. Fixes #25526 . Props simonwheatley
...
Built from https://develop.svn.wordpress.org/trunk@27424
git-svn-id: http://core.svn.wordpress.org/trunk@27271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 22:48:15 +00:00
Andrew Nacin
580b05ae5d
Strip backslashes, not just forward slashes, from untrailingslashit().
...
trailingslashit() will now remove any forward or backslashes from the end of a string before appending a forward slash.
props knutsp, willmot.
fixes #22267 .
Built from https://develop.svn.wordpress.org/trunk@27344
git-svn-id: http://core.svn.wordpress.org/trunk@27196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-01 21:45:15 +00:00
Andrew Nacin
ad8c3f0f02
Use placeholders in strings in wp_sprintf_l() to ensure spaces are not lost in translation.
...
props andy.
fixes #26651 .
Built from https://develop.svn.wordpress.org/trunk@27284
git-svn-id: http://core.svn.wordpress.org/trunk@27140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 16:50:15 +00:00
Scott Taylor
228fc639b9
When a video shortcode has content in its body, append it as inner HTML in the resulting <video>
.
...
Reverts [27096].
Fixes #26628 .
See #27016 .
Built from https://develop.svn.wordpress.org/trunk@27097
git-svn-id: http://core.svn.wordpress.org/trunk@26968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-05 01:43:12 +00:00
Andrew Ozz
98cb4984c0
Consolidate handling of <object>, <audio> and <video> in wpautop() and add unit tests for them. Part props wonderboymusic, see #26864
...
Built from https://develop.svn.wordpress.org/trunk@27094
git-svn-id: http://core.svn.wordpress.org/trunk@26966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-05 00:46:12 +00:00
Andrew Nacin
c4e119d530
Basic unit tests and additional documentation for wp_strip_all_tags().
...
props joehoyle.
fixes #25507 .
Built from https://develop.svn.wordpress.org/trunk@27042
git-svn-id: http://core.svn.wordpress.org/trunk@26916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-27 03:16:11 +00:00
Andrew Nacin
0ee1cb3046
make_clickable: When cleaning up accidental links within links, account for the tag being split by newlines.
...
props dd32.
fixes #19028 .
Built from https://develop.svn.wordpress.org/trunk@26974
git-svn-id: http://core.svn.wordpress.org/trunk@26853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-17 09:32:10 +00:00
Andrew Nacin
d9b0e70d4a
Unit tests for get_url_in_content(). Return false when no content is passed, to match the return value of no links being found.
...
props mdbitz.
#26171 .
Built from https://develop.svn.wordpress.org/trunk@26972
git-svn-id: http://core.svn.wordpress.org/trunk@26851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-17 07:47:10 +00:00
Ryan Boren
07c16fd23c
The Pinking Shears stir from their slumber, awakened by what may seem, to those
...
innocent in the ways of The Shears, a triviality, a nothing-of-consequence. But there are consequences indeed for recklessly trailing your whitespace. Naturally, they a dire!
One, two! One, two! And through and through
The Pinking Shears went snicker-snack!
They plucked your tail and with your space
They went sniksnuking back.
Let me tell you, that can be uncomfortable, so always pre-sniksnuk your trailing whites. May The Shears be with you.
Built from https://develop.svn.wordpress.org/trunk@26851
git-svn-id: http://core.svn.wordpress.org/trunk@26738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-11 19:49:11 +00:00
Drew Jaynes
087289b6a4
Hook docs pinking shears.
...
Built from https://develop.svn.wordpress.org/trunk@26631
git-svn-id: http://core.svn.wordpress.org/trunk@26521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-04 20:03:09 +00:00
Andrew Nacin
64ff23f8f8
Remove certain accents in the Danish language.
...
props tlamedia.
fixes #23907 .
Built from https://develop.svn.wordpress.org/trunk@26585
git-svn-id: http://core.svn.wordpress.org/trunk@26475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 20:39:09 +00:00
Andrew Nacin
98215089b9
Revert [26050], stop trying to balance open HTML tags across nextpage and more tags for now.
...
see #6297 .
Built from https://develop.svn.wordpress.org/trunk@26557
git-svn-id: http://core.svn.wordpress.org/trunk@26448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 17:08:10 +00:00
Sergey Biryukov
9fa0ec4e94
Escape smiley URL in translate_smiley().
...
props simonwheatley.
fixes #25529 .
Built from https://develop.svn.wordpress.org/trunk@26487
git-svn-id: http://core.svn.wordpress.org/trunk@26384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-30 22:39:10 +00:00
Sergey Biryukov
b6e094c748
Correct @since values. see #25518 .
...
Built from https://develop.svn.wordpress.org/trunk@26486
git-svn-id: http://core.svn.wordpress.org/trunk@26383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-30 19:05:10 +00:00
Drew Jaynes
2df1989c57
Inline documentation for hooks in wp-includes/formatting.php.
...
Props simonwheatley for the initial patch. Props DrewAPicture, kpdesign.
Fixes #25518 .
Built from https://develop.svn.wordpress.org/trunk@26485
git-svn-id: http://core.svn.wordpress.org/trunk@26382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-30 18:36:10 +00:00
Scott Taylor
dc01b08a5e
Add unit tests for links_add_target()
. Alter the patterns in links_add_target()
and _links_add_target()
slightly based on learnings after running tests.
...
Props mdbitz.
Fixes #26164 .
Built from https://develop.svn.wordpress.org/trunk@26328
git-svn-id: http://core.svn.wordpress.org/trunk@26230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-22 16:25:10 +00:00
Scott Taylor
c2bc0e6836
Don't place smilies inside of pre or code tags. Don't skip smilie after a smilie with an 8 in it. Fix regular expression used for smiley translations to work when there is only one registered emoticon.
...
Props solarissmoke, soulseekah, mdbitz, yonasy. ht to mdbitz for the Unit Tests and a comprehensive patch.
Fixes #16448 , #20124 , #25303 .
Built from https://develop.svn.wordpress.org/trunk@26191
git-svn-id: http://core.svn.wordpress.org/trunk@26099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 02:46:10 +00:00
Sergey Biryukov
3ce6b77afd
Use a simple replacement for 'wp_title' filter in capital_P_dangit(), like we do for 'the_title'.
...
props nacin.
fixes #25796 .
Built from https://develop.svn.wordpress.org/trunk@26122
git-svn-id: http://core.svn.wordpress.org/trunk@26034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 03:56:09 +00:00
Scott Taylor
2e0af4405e
Make HTML tag searches for <code>
and <pre>
case-insensitive in make_clickable()
.
...
Props bpetty.
Fixes #23756 .
Built from https://develop.svn.wordpress.org/trunk@26094
git-svn-id: http://core.svn.wordpress.org/trunk@26010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 21:54:10 +00:00
Scott Taylor
275f39216a
Don't convert URLs inside <pre>
and <code>
tags when parsing string using make_clickable()
.
...
Adds Unit Tests.
Props johnjamesjacoby, helen, nacin, adamsilverstein, sirbrillig.
Fixes #23756 .
Built from https://develop.svn.wordpress.org/trunk@26052
git-svn-id: http://core.svn.wordpress.org/trunk@25977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-08 22:38:10 +00:00
Scott Taylor
734fe0f6ad
Split the content to balance open tags when <!--nextpage-->
and <!--more.*?-->
are used. Needs filter inline docs. The 4 unit tests that were previously failing for ticket 6297 now pass.
...
See #6297 .
Props devesine.
Built from https://develop.svn.wordpress.org/trunk@26050
git-svn-id: http://core.svn.wordpress.org/trunk@25975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-08 22:22:11 +00:00
Andrew Nacin
d93d8b850d
Reverse the order of roles in wp_dropdown_roles(). Reset to 'subscriber' when the default role is removed and when a save is invalid.
...
props garyc40, wonderboymusic.
fixes #14578 .
Built from https://develop.svn.wordpress.org/trunk@25695
git-svn-id: http://core.svn.wordpress.org/trunk@25610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-06 10:56:09 +00:00
Sergey Biryukov
bcb43b77d0
Correct phpdoc for translate_smiley(). props toscho. fixes #25440 .
...
Built from https://develop.svn.wordpress.org/trunk@25646
git-svn-id: http://core.svn.wordpress.org/trunk@25563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-29 10:08:10 +00:00
Dion Hulse
8a50bf2f14
Use a better variable name in antispambot() introduced with [25055]. Props duck_ Fixes #16754
...
Built from https://develop.svn.wordpress.org/trunk@25146
git-svn-id: http://core.svn.wordpress.org/trunk@25125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-28 01:47:09 +00:00
Dion Hulse
7317940591
Correct a typo in a docblock in [25055]. Props buffler. See #16754
...
Built from https://develop.svn.wordpress.org/trunk@25058
git-svn-id: http://core.svn.wordpress.org/trunk@25044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-20 07:10:09 +00:00
Dion Hulse
47c82e1c83
Remove some PHP4-ness from the antispambot() function, and update it to match some modern coding standards. Props hakre and crrobi01 for initial patches. Fixes #16754
...
Built from https://develop.svn.wordpress.org/trunk@25055
git-svn-id: http://core.svn.wordpress.org/trunk@25041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-20 06:08:09 +00:00
Dion Hulse
2da772855e
Simplify _deep_replace() by removing it's obscure looping and replacement checking logic, and instead, using the PHP5 $count parameter of str_replace(). Props hakre. Fixes #16903
...
Built from https://develop.svn.wordpress.org/trunk@25054
git-svn-id: http://core.svn.wordpress.org/trunk@25040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-20 05:57:10 +00:00
Andrew Nacin
8ee6d136de
Adjust esc_sql()'s @param documentation to reflect that it allows for arrays. props scribu, fixes #22573 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-05 22:11:30 +00:00
Andrew Nacin
3b4f3dea29
Deprecate wpdb::escape() in favor of wpdb::prepare() and esc_sql(). fixes #24774 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-16 17:44:42 +00:00
Andrew Nacin
7690d7fbeb
Move get_url_in_content() out of post-formats.php. see #24202 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-12 19:38:37 +00:00
Andrew Nacin
bfb3b89672
Skip protocol checking in esc_url() when we are dealing with a relative URL. Prevents munging of colons in paths and query strings, when present in a protocol-relative URL.
...
props SergeyBiryukov.
fixes #21974 .
git-svn-id: http://core.svn.wordpress.org/trunk@24642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-10 13:45:22 +00:00
Andrew Nacin
720f37c374
Expand human_time_diff() from minutes/hours/days to also include weeks/months/years. Fix off-by-one issue.
...
props SergeyBiryukov, westi.
fixes #9272 .
git-svn-id: http://core.svn.wordpress.org/trunk@24582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 13:00:34 +00:00
Sergey Biryukov
58c364947f
PHPDoc fixes and additions. fixes #24616 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-21 12:45:11 +00:00
Andrew Nacin
d80469f8a5
Fix storage of illegal_names. Add an upgrade routine to fix bad values.
...
props SergeyBiryukov.
see #23418 .
for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@24448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-19 22:06:42 +00:00
Mark Jaquith
74c6071b9d
Improve regular expressions by using a backreference to match right quote of quote pair when matching attributes.
...
props kovshenin. see #24225 .
git-svn-id: http://core.svn.wordpress.org/trunk@24241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-10 22:54:33 +00:00
Sergey Biryukov
74638ccb5a
Fix typos in phpdoc. props TheLastCicada. fixes #24302 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-10 01:39:30 +00:00
Sergey Biryukov
415a5c60da
* Pass ellipsis as a parameter to wp_html_excerpt() instead of appending it manually.
...
* Consolidate the logic to avoid appending ellipsis if the entire string is shown.
* Show ellipsis after truncated filenames and post titles.
props solarissmoke, bpetty, SergeyBiryukov. fixes #11446 .
git-svn-id: http://core.svn.wordpress.org/trunk@24214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-09 00:22:02 +00:00
Sergey Biryukov
57c10eadbb
Use ellipsis instead of three dots. props tjsingleton, jordie23, wojtek.szkutnik, DrewAPicture, SergeyBiryukov. see #8714 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 21:27:31 +00:00
Andrew Nacin
3139a0451e
Variables passed by reference do not need to be set first.
...
props kovshenin.
see #24222 .
git-svn-id: http://core.svn.wordpress.org/trunk@24129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-29 14:48:31 +00:00
Andrew Nacin
f1aeebf00b
Improve the performance of backslashit() by avoiding regular expressions. backslashit() is used heavily in date_i18n().
...
props jbutkus.
fixes #22286 .
git-svn-id: http://core.svn.wordpress.org/trunk@24051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-22 20:01:57 +00:00
Sergey Biryukov
d454a9c86b
Remove duplicate array key. props tivnet. fixes #24021 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-10 15:55:53 +00:00
Peter Westwood
072cccd0e4
Formatting: Pass the blog charset to htmlspecialchars so that we don't eat non-UTF8 strings in PHP 5.4
...
Fixes #23688
git-svn-id: http://core.svn.wordpress.org/trunk@23685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-13 15:24:38 +00:00
Andrew Nacin
2ca0cdcdfe
Properly handle timezones in get_date_from_gmt() rather than relying on the implicit gmt_offset. This offset is only good for the current time, rather than the passed time, which causes problems when converting a DST date when DST is not in effect, or vice versa.
...
Update get_gmt_from_date() to make these functions match in formatting, as they are complementary and just reverse a few operations.
props scholesmafia
Tests: [1233/tests]
fixes #20328 .
git-svn-id: http://core.svn.wordpress.org/trunk@23618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-05 16:14:14 +00:00
Ryan Boren
15a06a35ab
Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
...
see #WP21767
git-svn-id: http://core.svn.wordpress.org/trunk@23591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-03 16:30:38 +00:00
Ryan Boren
53f9496a2f
Introduce wp_slash() and wp_unslash(). This will be used to cleanup the myriad calls to addslashes*, add_magic_quotes, stripslashes*. see #21767
...
git-svn-id: http://core.svn.wordpress.org/trunk@23555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:34:48 +00:00
Ryan Boren
43a7e695e9
Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
...
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Andrew Nacin
b88b1c1f53
Move revisions/autosave and post format functions from wp-includes/post.php into revision.php and post-formats.php.
...
git-svn-id: http://core.svn.wordpress.org/trunk@23466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-21 21:24:34 +00:00
Helen Hou-Sandí
6d49a9cc8c
Output fallbacks / theme compat for post format metadata.
...
* Currently handles link, quote, image, gallery, audio, and video formats.
* `add_theme_support()` for a given post format is now an indicator that the theme handles format-specific metadata.
* If no support for a given format is defined, fallback output will be generated and hooked onto the_content if a post has metadata for that format.
* Fallbacks attempt to be smart about not duplicating data already appearing in the post content itself. Gallery is particularly liberal, looking for any instance of the gallery shortcode in the content, not just an exact match to the gallery shortcode defined in the format-specific meta.
* Compat output defaults to being wrapped in a `div` with a class of `post-format-content`.
Theme authors: please test and evaluate, keeping in mind that the goal is to support user expectations of not losing format-specific data they've entered in the admin when viewing the front-end of their site.
props wonderboymusic, beaulebens, helen. see #23347 .
git-svn-id: http://core.svn.wordpress.org/trunk@23450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-18 19:22:58 +00:00
Sergey Biryukov
8fb830eeda
Fix typos in phpdoc. props markmcwilliams. fixes #23481 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-15 18:59:56 +00:00
Ryan Boren
cc5ed3a485
Change all core API to expect unslashed rather than slashed arguments.
...
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.
Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.
Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.
Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.
Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.
Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.
Plugins should use wp_unslash() on data being passed to core API.
Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.
Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.
Remove many no longer necessary calls to $wpdb->escape() and esc_sql().
In wp_get_referer() and wp_get_original_referer(), return unslashed data.
Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.
Switch several queries over to prepare().
Expect something to break.
Props alexkingorg
see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Sergey Biryukov
9b347300e5
Correct the documentation for balanceTags(). Remove unnecessary boolean inversion. props TobiasBg. fixes #22537 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-01 22:20:06 +00:00
Sergey Biryukov
8cfd9e3c81
PHPDoc fixes and additions. props bananastalktome, DrewAPicture. fixes #23313 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-01 18:07:08 +00:00
Sergey Biryukov
8dbeee25b9
Use digraphs for German umlauts in remove_accents(). props SergeyBiryukov, ocean90. fixes #3782 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-31 01:55:09 +00:00
Andrew Ozz
50ceba1323
Autop: <samp> is not a block tag, props toscho, fixes #18807
...
git-svn-id: http://core.svn.wordpress.org/trunk@23327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-22 19:05:21 +00:00
Andrew Nacin
c9a6c4ba0c
Treat URL schemes as case insensitive when sanitizing them in esc_url().
...
props mdawaffe.
fixes #23187 .
tests: [1184/tests]
git-svn-id: http://core.svn.wordpress.org/trunk@23303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-17 15:07:32 +00:00
Peter Westwood
f683fc7677
Tighten our braces. Fixes #23118 props evansolomon.
...
git-svn-id: http://core.svn.wordpress.org/trunk@23265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-04 10:13:51 +00:00
Helen Hou-Sandí
ba9220bd1f
s/Santizes/Sanitizes/ in phpdoc for sanitize_html_class(). props cais. fixes #22890 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-20 15:40:37 +00:00
Andrew Nacin
11e2073d89
Remove additional acute accents from permalink slugs via sanitize_title_with_dashes(). props SergeyBiryukov. fixes #22395 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-13 09:59:28 +00:00
Andrew Nacin
97032e08aa
Revert page on front changes. Reverts [22127] [22129] [22135] [22136]. see #16379 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 01:28:32 +00:00
Andrew Nacin
a73aa40cb5
Avoid an uncaught exception in get_gmt_from_date(). The return value is imperfect - date( $format, 0 ) - but better than a fatal error. props wonderboymusic. fixes #20942 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 20:07:41 +00:00
Jon Cave
df39c7be71
Update shortcode regular expression commentary. See #17657 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 14:47:33 +00:00
Ryan Boren
3757d63f6b
Allow hyphens in shortcode names.
...
Props kovshenin, solarissmoke, aaroncampbell
fixes #17657
git-svn-id: http://core.svn.wordpress.org/trunk@22382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 22:27:36 +00:00
Ryan Boren
21d6dbc4a8
Fix wp_basename() for Windows by replacing %5C with /.
...
Props SergeyBiryukov
fixes #22138
git-svn-id: http://core.svn.wordpress.org/trunk@22310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-25 22:31:17 +00:00
Ryan Boren
80a142c6a4
Pass each url in ping_sites through esc_url_raw() upin save. This ensures the urls have a valid protocol and avoids "Unable to parse URL" warning in WP_Http. Props SergeyBiryukov. fixes #21966
...
git-svn-id: http://core.svn.wordpress.org/trunk@22255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-17 17:44:40 +00:00
Andrew Nacin
853184672d
Set show_on_front to 'posts' when no value is set. This occurs when the show_on_front checkbox is left unchecked and then sent through options.php. fixes #22131 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-08 18:41:19 +00:00
Andrew Nacin
1009245fa1
Remove the 'Size of the post box' (default_post_edit_rows) option. This will instead be handled by a user cookie tracking the resizing of both TinyMCE and the main textarea. see #21718 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 03:17:28 +00:00
Andrew Nacin
a6c93e2f65
Always attempt to embed URLs in content, removing the Auto-embeds (autoembed_urls) option.
...
Remove the UI for setting the default width and height for embeds. Width was confusing as it
was blank by default (inheriting the content width from the theme, or 500px). The height is
now calculated as 1.5x the content width, or 1000px, whichever is smaller.
The [embed] shortcode can still receive manual height and width attributes. This just removes
the global settings.
props wonderboymusic. see #21719 .
git-svn-id: http://core.svn.wordpress.org/trunk@21998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-25 07:10:09 +00:00
Andrew Nacin
557d9313a7
Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-25 05:26:19 +00:00
Andrew Nacin
0d37467603
Move sanitization for the multisite illegal_names, limited_email_domains, and banned_email_domains options to sanitize_option(). props wonderboymusic. fixes #21552 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-25 01:54:12 +00:00
Andrew Nacin
8fd2fb4998
Synchronize block-level elements between the JS and PHP versions of wpautop. props SergeyBiryukov. fixes #18534 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-18 17:32:44 +00:00
Andrew Nacin
1beb18d241
Add Pinyin diacritics to remove_accents(). Remove these diacritics in sanitize_title_with_dashes() on save as well. props bolo1988, SergeyBiryukov. fixes #20772 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-15 20:01:08 +00:00
Andrew Nacin
a8a78b8975
"[ ] Discourage search engines from indexing this site". fixes #16416 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 20:26:20 +00:00
Andrew Nacin
f4c9c9ce0d
Use the non-slashing variants of kses functions in sanitize_option() to avoid slash ping pong. fixes #21892 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-14 19:32:53 +00:00
Andrew Nacin
f54edf701a
When balancing tags, properly close tags that shouldn't be self-closed but are. Support all self-closing tags.
...
props coffee2code.
fixes #1597 .
git-svn-id: http://core.svn.wordpress.org/trunk@21828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-13 16:39:06 +00:00
Andrew Nacin
e75671452c
Properly delimit URLs by \r, \n, \t *or* a space in sanitize_trackback_urls(). Fixes multiple trackback URL usage. props SergeyBiryukov, fixes #21624 for trunk.
...
git-svn-id: http://core.svn.wordpress.org/trunk@21718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 03:36:19 +00:00
nacin
81ae841eba
Only run stripslashes() in stripslashes_deep() for strings, not other scalar values. props Kawauso, knutsp. props coffee2code for [UT698]. fixes #18026 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-20 15:14:26 +00:00
nacin
6c2720b7d1
HTML object tags are self-nestable. props coffee2code. fixes #20401 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-09 19:27:44 +00:00
markjaquith
d644bc50b0
Collapse an i18n context to make it more accurate and to make for one less string to translate. props pavelevap. fixes #21137
...
git-svn-id: http://core.svn.wordpress.org/trunk@21242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-09 05:08:43 +00:00
markjaquith
d65e49c9f3
Bunch of PHPDoc corrections and cleanups. props c3mdigital. props SergeyBiryukov. fixes #21149
...
git-svn-id: http://core.svn.wordpress.org/trunk@21241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-09 05:03:53 +00:00
ryan
c0339644ea
Shears of vigorous pinking.
...
git-svn-id: http://core.svn.wordpress.org/trunk@20944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-27 16:25:43 +00:00
westi
b36c335b7a
i18n: Update the word splitting we use when trimming strings to build excerpts so that it has support for a character based mode for locales where character splitting is more approproate like Japan.
...
See #16079 props tenpura.
git-svn-id: http://core.svn.wordpress.org/trunk@20859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-23 21:04:35 +00:00
nacin
d74bcb4a14
Add Vietnamese vowels to remove_accents(). props SergeyBiryukov. fixes #17738 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@20687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-02 16:55:16 +00:00
nacin
874cd9077f
Add characters to be stripped or replaced in sanitize_title_with_dashes().
...
* Replace times (multiplication sign) with x.
* Strip low quotation marks and other curly quotes we don't already deal with.
props SergeyBiryukov. fixes #19820 .
git-svn-id: http://core.svn.wordpress.org/trunk@20686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-02 16:37:42 +00:00
markjaquith
38dffbfe04
Ignore this. Just need an un-synced-to-GitHub commit so I can switch to using the new core.svn.wordpress.org URL.
...
git-svn-id: http://core.svn.wordpress.org/trunk@20672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-01 21:05:02 +00:00
nacin
32c8d41cde
Properly convert two special Z characters in convert_chars(). props Namely, SergeyBiryukov. fixes #20503 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-30 21:20:50 +00:00
nacin
3f51df65e0
Run rawurlencode_deep() through the parsed query in canonical. (Introduces rawurlencode_deep().) props toppa for the initial patch. fixes #20143 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-27 15:40:00 +00:00
duck_
7d8a08881e
Recognise protocols other than "http" in _links_add_base(). Props SergeyBiryukov. Fixes #19665 .
...
Previously "https" URLs used in plugin READMEs displayed by install_plugin_information() would have the plugin's extend URL prepended.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-14 19:14:10 +00:00
ryan
be5802b0f1
Don't attempt to make links inside attributes clickable. Props duck_ azaozz. fixes #20418
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-11 21:14:13 +00:00
azaozz
b358b4accc
Do not process <pre> tags with wpautop, replace them with placeholders, process the rest of the content and then put them back. Part props kurtpayne, see #19855
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-28 15:43:31 +00:00
nacin
248843afc4
<input> is not a block-level element; do not treat it like one in wpautop(). props SergeyBiryukov. props kurtpayne for the unit test. fixes #16456 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-02 19:59:50 +00:00
azaozz
73c87020c7
HTML in image captions, first run, see #18311
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-24 01:58:18 +00:00
nacin
8961a61f89
Combine two identical case statements.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-16 15:42:02 +00:00
nacin
66f64c7c01
Use correct reference in regex. props danielbachhuber, fixes #20018 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-10 22:28:37 +00:00
duck_
5648dd3547
Add @since and @access tag to _split_str_by_whitespace(). Props ocean90. See #16892 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-10 13:57:21 +00:00
duck_
d8a694d8ac
Improve efficiency of make_clickable(). Props mdawaffe. Fixes #16892 .
...
Not only does this improve general performance, but also helps to prevent
segfaults caused by malicious input to the regular expression. The regular
expression is also simplified to help readability and maintenance.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-10 13:42:15 +00:00
nacin
2aec12b287
wptexturize() does not need to staticize variables it only uses to set up variables it needs statically. see #19602 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-31 14:28:30 +00:00
nacin
1b7effa6eb
Allow the single quotes, apostrophes, and primes in wptexturize() to be translated. Allows replacements to be disabled by translating them back to " and '. fixes #19602 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-31 14:06:32 +00:00
ryan
e3b46b25d3
Lose EOF ?>. Clean up EOF newlines. fixes #12307
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan
3eaf083995
Introduce sanitize_trackback_urls(). Don't ping bad urls. Don't ping bad urls or save them to the DB. Props xknown, SergeyBiryukov. fixes #17560
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-04 19:45:13 +00:00
nacin
2ba0d300c4
Correct the documentation for balanceTags(). props mdawaffe, fixes #19576 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-16 20:57:05 +00:00
ryan
07ff8b216b
Use one space, not two, after trailing punctuation. fixes #19537
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
nacin
524284fd6b
Allow 8212/8211 (em dash and en dash) to be translated in wptexturize(). props SergeyBiryukov, fixes #15556 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-06 18:31:54 +00:00
nacin
b2560a3025
Add a few characters to remove_accents(). props SergeyBiryukov. props ampt for [UT471]. fixes #9591 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-02 23:08:05 +00:00
ryan
91bc97be7b
Allow 0 - 9 in tag_escape(). Props sirzooro. fixes #18765
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-12 20:34:14 +00:00
ryan
80351b789d
Avoid preg backtrack limit errors with large posts when processing shortcodes. Props mdawaffe. fixes #15600
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-12 16:50:30 +00:00
ryan
b3054bd18f
phpdoc fix for zeroise(). Props trepmal. fixes #18854
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-04 16:02:33 +00:00
duck_
4171ea192b
Introduce wp_allowed_protocols() for use in wp_kses() and esc_url(). See #18268 .
...
This allows plugins to filter the list of protocols used for esc_url() too, and helps us keep the list of protocols in sync.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-29 22:33:51 +00:00
markjaquith
33c150d3de
Allow the text parameter in wp_trim_excerpt() to be omitted altogether, instead of requiring a blank string. props SergeyBiryukov. fixes #17492
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-29 21:48:03 +00:00
nacin
07567002bb
Update esc_url() phpdoc. props sirzooro, fixes #18766 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-24 19:52:26 +00:00
duck_
2fb95a133d
wp_strip_all_tags() in wp_trim_words() to remove CSS and JS within tags. Props evansolomon. Fixes #18726 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-21 20:39:21 +00:00
ryan
7aedd7ec52
Run the sanitize_option_* filter for all options in sanitize_option(). Add some sanity checks for the permalink options while in there. fixes #18737
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-21 19:05:06 +00:00
duck_
8cfc0fa5ec
Abstract word-trimming from wp_trim_excerpt() into wp_trim_words(). Props nacin. Fixes #16372 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-20 17:14:23 +00:00
nacin
e5ca4fea40
Strip a number of special characters in sanitize_title_with_dashes on save. Includes quotes (curly, angle), dashes, marks, etc. props SergeyBiryukov. props ampt for the unit tests in [UT438]. see #10797 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-18 19:53:59 +00:00
duck_
e4ed63fc6f
Fix typos in documentation (wp-includes/[a-h]). See #18560 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-03 16:02:41 +00:00
nacin
d5cf830175
Add 'q' tag to nestable tags list in force_balance_tags(). props solarissmoke, fixes #6870 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-23 15:37:38 +00:00
ryan
6c39a6f769
Better double encoding handling in _wp_special_chars(). Props miqrogroove.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-07-29 20:43:45 +00:00