mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Clean feed and trackback URLs.
git-svn-id: https://develop.svn.wordpress.org/trunk@836 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -73,6 +73,7 @@ function wpautop($pee, $br = 1) {
|
||||
$pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates
|
||||
$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "\t<p>$1</p>\n", $pee); // make paragraphs, including one at the end
|
||||
$pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
|
||||
$pee = preg_replace('!<p>\s*(</?(?:table|tr|td|th|div|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*</p>!', "$1", $pee); // don't pee all over a tag
|
||||
$pee = preg_replace("|<p>(<li.+?)</p>|", "$1", $pee); // problem with nested lists
|
||||
$pee = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee);
|
||||
$pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);
|
||||
@@ -146,6 +147,12 @@ function backslashit($string) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
function trailingslashit($string) {
|
||||
if ( '/' != substr($string, -1)) {
|
||||
$string .= '/';
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
function mysql2date($dateformatstring, $mysqlstring, $use_b2configmonthsdays = 1) {
|
||||
global $month, $weekday;
|
||||
|
||||
Reference in New Issue
Block a user