Commit Graph

165 Commits

Author SHA1 Message Date
ryan c6838b1761 Pass delimiter to preg_quote(). Props Denis-de-Bernardy. see #9955
git-svn-id: http://svn.automattic.com/wordpress/trunk@11634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-06-23 22:10:46 +00:00
westi 0dba5eddcf Introduce _deep_replace() and use it to improve the stripping of percent encoded values from urls. Fixes #10226 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-06-20 17:42:24 +00:00
ryan c7d287c45a Don't pass by reference. Props kamiyeye. fixes #9994
git-svn-id: http://svn.automattic.com/wordpress/trunk@11518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-06-04 05:32:58 +00:00
azaozz d99872af71 Allow translators to change the curly quotes in wptexturize(), props nbachiyski fixes #10001
git-svn-id: http://svn.automattic.com/wordpress/trunk@11504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-06-02 00:27:53 +00:00
markjaquith cacfffd068 Add esc_sql(), for completeness.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-29 20:31:52 +00:00
ryan 2df887bd07 Trim tailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@11450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-24 23:47:49 +00:00
westi fc3b5ba6da Rename new function to sanitize_html_class() to hilight exactly what it is for, Fixes #8446.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-22 21:31:42 +00:00
westi 108f7c1063 Introduce sanitise_css_classname() and use it to give categories, tags, users etc meaningful classnames where possible. Falls back to the id if not. Fixes #8446.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-22 17:44:26 +00:00
ryan a6580f16f5 seems_utf8() cleanup. Props hakre. fixes #9692
git-svn-id: http://svn.automattic.com/wordpress/trunk@11414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-20 21:13:14 +00:00
ryan 46c5f5b84c Fix item count in wp_sprintf_l(). Props abelcheung. fixes #9847
git-svn-id: http://svn.automattic.com/wordpress/trunk@11394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-19 15:36:01 +00:00
markjaquith 3ebf837ced Deprecate sanitize_url() and clean_url() in favor of esc_url_raw() and esc_url()
git-svn-id: http://svn.automattic.com/wordpress/trunk@11383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-18 16:00:33 +00:00
markjaquith 119b39cec2 deprecate wp_specialchars() in favor of esc_html(). Encode quotes for esc_html() as in esc_attr(), to improve plugin security.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-18 15:11:07 +00:00
ryan 0f7d055621 Handle nested tag in wptexturize(). Props nbachiyski. fixes #7056 see #6969
git-svn-id: http://svn.automattic.com/wordpress/trunk@11345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-15 21:37:18 +00:00
westi 378aaa973e Ensure that wp_specialchars captures all pre-encoded entities correctly when preventing double encoding. Fixes #9821.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-15 06:29:19 +00:00
markjaquith 5f17b95d0f Exclude <tt> from formatting. props JulienV. fixes #8321
git-svn-id: http://svn.automattic.com/wordpress/trunk@11313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-12 22:51:24 +00:00
markjaquith d7b015645d esc_js(). Shorter, follows new escaping naming convention.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-09 07:27:22 +00:00
ryan bf92d8a323 Escape title attributes in calendar links. fixes #8967
git-svn-id: http://svn.automattic.com/wordpress/trunk@11215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-06 04:56:32 +00:00
markjaquith 6c2ffddf31 _a(), _ea(), _xa(), attr() are now esc_attr__(), esc_attr_e(), esc_attr_x(), esc_attr() -- still short, but less cryptic. see #9650
git-svn-id: http://svn.automattic.com/wordpress/trunk@11204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-05 19:43:53 +00:00
ryan 3072fbb30d sanitize_file_name() improvements. Props sivel. fixes #9416
git-svn-id: http://svn.automattic.com/wordpress/trunk@11178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-04 20:20:48 +00:00
ryan 64e33fdaa8 Don't prepend http to fragments. Props scohoust. fixes #4051
git-svn-id: http://svn.automattic.com/wordpress/trunk@11126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-29 20:10:06 +00:00
ryan 2d489767bb s/attribute_escape/attr/. see #9650
git-svn-id: http://svn.automattic.com/wordpress/trunk@11109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-28 05:58:45 +00:00
ryan 2249c69021 attr(), _a(), _ea(), _xa() for shorthand attribute escaping. see #9650
git-svn-id: http://svn.automattic.com/wordpress/trunk@11103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-27 21:58:04 +00:00
ryan f52d1dd2b0 Eliminate preg_replace with /e. Props tbaboon. fixes #8689
git-svn-id: http://svn.automattic.com/wordpress/trunk@11098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-27 16:17:24 +00:00
azaozz 9c1c3f7eda Add <col> to list of block elements, props CharlieHamu and Denis-de-Bernardy, fixes #9484
git-svn-id: http://svn.automattic.com/wordpress/trunk@11070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-23 08:28:22 +00:00
azaozz 3321ea5ec8 Don't output <br /> for empty posts, props Denis-de-Bernardy, fixes #6128
git-svn-id: http://svn.automattic.com/wordpress/trunk@11048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-22 07:37:24 +00:00
ryan bfe4032208 Allow pipes through clean_url(). Props scohoust. fixes #7145
git-svn-id: http://svn.automattic.com/wordpress/trunk@11023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-20 22:02:17 +00:00
ryan a61bc0ec8a Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@11013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-20 18:18:39 +00:00
ryan 5275d71c22 make_clickable() regex fixes. Props piouPiouM. fixes #9390
git-svn-id: http://svn.automattic.com/wordpress/trunk@10989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-17 16:51:53 +00:00
ryan 3804199e9b Add wp_trim_excerpt filter. Props coffee2code. fixes #9558
git-svn-id: http://svn.automattic.com/wordpress/trunk@10981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-17 06:59:33 +00:00
markjaquith c64513ba22 Dots in post slugs should be dashed, not dropped. props Denis-de-Bernardy. fixes #9489
git-svn-id: http://svn.automattic.com/wordpress/trunk@10977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-17 03:28:55 +00:00
azaozz 14bd87615e Spaced hyphens into spaced dashes, props ionfish, fixes #8161
git-svn-id: http://svn.automattic.com/wordpress/trunk@10973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-17 01:38:52 +00:00
ryan 8e26610a07 Pass the unprocessed title to the sanitize_title filter. Props chineseleper. fixes #8981 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@10804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-17 17:42:54 +00:00
azaozz 9b591073a1 Fix regex in sanitize_email(), props sambauers, see #9316
git-svn-id: http://svn.automattic.com/wordpress/trunk@10783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-14 01:35:47 +00:00
azaozz 2330e2029e Fix regex function in sanitize_email(), see #9316
git-svn-id: http://svn.automattic.com/wordpress/trunk@10777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-13 19:04:39 +00:00
ryan 7ceebc2a27 Improved is_email() and sanitize_email(). Props sambauers. fixes #9316 #4616
git-svn-id: http://svn.automattic.com/wordpress/trunk@10769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-11 15:26:34 +00:00
ryan d10b538652 gettext contexts. Props nbachiyski. see #9112
git-svn-id: http://svn.automattic.com/wordpress/trunk@10767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-10 23:02:29 +00:00
ryan a867852888 Use mb_substr instead of mb_strcut in wp_html_excerpt. Props demetris. fixes #9055
git-svn-id: http://svn.automattic.com/wordpress/trunk@10702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-04 19:41:18 +00:00
ryan fc660a45a3 Use _n(). Props nbachiyski. fixes #9111
git-svn-id: http://svn.automattic.com/wordpress/trunk@10606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-20 19:35:16 +00:00
ryan fbba337987 Handle links with parens in make_clickable(). Props filosofo. fixes #8300
git-svn-id: http://svn.automattic.com/wordpress/trunk@10562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-12 19:52:43 +00:00
azaozz d3932e2388 Reduce backtracking in autop, fixes #6877, see #8553
git-svn-id: http://svn.automattic.com/wordpress/trunk@10527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-08 16:08:02 +00:00
azaozz da29afdf3b Fix PHP notice in force_balance_tags(), props beaulebens, fixes #9067
git-svn-id: http://svn.automattic.com/wordpress/trunk@10523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-08 04:16:58 +00:00
ryan d5ca3badae Add missing preg delimiters. Props ridgerunner. fixes #8986 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@10459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-29 17:46:31 +00:00
ryan 7d53481dcb Silence charset not supported warnings
git-svn-id: http://svn.automattic.com/wordpress/trunk@10398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-21 20:28:51 +00:00
azaozz 6f0c0a1092 Fix incorrect quote style in wp_specialchars, props sambauers, see #8767
git-svn-id: http://svn.automattic.com/wordpress/trunk@10376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-19 04:40:12 +00:00
westi 23587f4c8e Update phpdoc for get_gmt_from_date(). Fixes #8869 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@10370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-17 10:20:49 +00:00
azaozz d7001aa719 Speed up wp_specialchars, props sambauers, see #8767
git-svn-id: http://svn.automattic.com/wordpress/trunk@10355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-13 15:18:37 +00:00
ryan 0858d9b0c2 Use preg_replace_callback instead of preg_replace with eval. Props beaulebens. see #8689
git-svn-id: http://svn.automattic.com/wordpress/trunk@10339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-09 19:29:35 +00:00
ryan 69914b0ae2 Faster smilies. Props johanee. fixes #6464
git-svn-id: http://svn.automattic.com/wordpress/trunk@10322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-06 18:20:47 +00:00
azaozz ec1ca2236f Latest version of the patch for refactor filters to avoid potential XSS attacks, props sambauers and DD32, see #8767
git-svn-id: http://svn.automattic.com/wordpress/trunk@10298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-04 23:37:47 +00:00
azaozz 19848b9d90 Refactor filters to avoid potential XSS attacks, props sambauers and DD32, see #8767
git-svn-id: http://svn.automattic.com/wordpress/trunk@10297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-01-04 22:25:50 +00:00