Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
9ff2c1b3
Commit
9ff2c1b3
authored
Dec 31, 2005
by
Steven Wittens
Browse files
-
#42828
: Auto-p destroys alphanumeric named entities like ½
parent
46c68141
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/filter.module
View file @
9ff2c1b3
...
...
@@ -1034,7 +1034,7 @@ function _filter_autop($text) {
$chunk
=
preg_replace
(
'|(?<!<br />)\s*\n|'
,
"<br />
\n
"
,
$chunk
);
// make line breaks
$chunk
=
preg_replace
(
'!(</?(?:table|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*<br />!'
,
"$1"
,
$chunk
);
$chunk
=
preg_replace
(
'!<br />(\s*</?(?:p|li|div|th|pre|td|ul|ol)>)!'
,
'$1'
,
$chunk
);
$chunk
=
preg_replace
(
'/&([^#])(?![
a-z
]{1,8};)/'
,
'&$1'
,
$chunk
);
$chunk
=
preg_replace
(
'/&([^#])(?![
A-Za-z0-9
]{1,8};)/'
,
'&$1'
,
$chunk
);
}
$output
.
=
$chunk
;
}
...
...
modules/filter/filter.module
View file @
9ff2c1b3
...
...
@@ -1034,7 +1034,7 @@ function _filter_autop($text) {
$chunk
=
preg_replace
(
'|(?<!<br />)\s*\n|'
,
"<br />
\n
"
,
$chunk
);
// make line breaks
$chunk
=
preg_replace
(
'!(</?(?:table|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*<br />!'
,
"$1"
,
$chunk
);
$chunk
=
preg_replace
(
'!<br />(\s*</?(?:p|li|div|th|pre|td|ul|ol)>)!'
,
'$1'
,
$chunk
);
$chunk
=
preg_replace
(
'/&([^#])(?![
a-z
]{1,8};)/'
,
'&$1'
,
$chunk
);
$chunk
=
preg_replace
(
'/&([^#])(?![
A-Za-z0-9
]{1,8};)/'
,
'&$1'
,
$chunk
);
}
$output
.
=
$chunk
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment