Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
htmlpurifier-3375949
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
htmlpurifier-3375949
Commits
8fb7b576
Commit
8fb7b576
authored
15 years ago
by
ezyang
Browse files
Options
Downloads
Patches
Plain Diff
Update module for HTML Purifier 4.0.0.
parent
64fa69da
No related branches found
Branches containing commit
Tags
6.x-2.0
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
INSTALL.txt
+1
-1
1 addition, 1 deletion
INSTALL.txt
htmlpurifier.install
+1
-1
1 addition, 1 deletion
htmlpurifier.install
htmlpurifier.module
+9
-8
9 additions, 8 deletions
htmlpurifier.module
with
11 additions
and
10 deletions
INSTALL.txt
+
1
−
1
View file @
8fb7b576
* Place the htmlpurifier folder in your drupal modules directory.
* Download HTML Purifier from http://htmlpurifier.org/ You will need
3.1.0rc1
or later.
4.0.0
or later.
* Extract the "library" folder and place it inside your modules/htmlpurifier
directory.
...
...
This diff is collapsed.
Click to expand it.
htmlpurifier.install
+
1
−
1
View file @
8fb7b576
...
...
@@ -36,7 +36,7 @@ function htmlpurifier_uninstall() {
*/
function
_htmlpurifier_version_check
()
{
// This version of HTML Purifier is required
static
$req_version
=
'
3.1
.0'
;
static
$req_version
=
'
4.0
.0'
;
// Can't use drupal_get_path, since module may not have been installed.
$module_path
=
dirname
(
__FILE__
);
...
...
This diff is collapsed.
Click to expand it.
htmlpurifier.module
+
9
−
8
View file @
8fb7b576
...
...
@@ -183,23 +183,23 @@ function _htmlpurifier_get_config($format) {
$config
=
HTMLPurifier_Config
::
createDefault
();
$config
->
set
(
'AutoFormat
'
,
'
AutoParagraph'
,
TRUE
);
$config
->
set
(
'AutoFormat
'
,
'
Linkify'
,
TRUE
);
$config
->
set
(
'HTML
'
,
'
Doctype'
,
'XHTML 1.0 Transitional'
);
// Probably
$config
->
set
(
'Core
'
,
'
AggressivelyFixLt'
,
TRUE
);
$config
->
set
(
'Cache
'
,
'
DefinitionImpl'
,
'Drupal'
);
$config
->
set
(
'AutoFormat
.
AutoParagraph'
,
TRUE
);
$config
->
set
(
'AutoFormat
.
Linkify'
,
TRUE
);
$config
->
set
(
'HTML
.
Doctype'
,
'XHTML 1.0 Transitional'
);
// Probably
$config
->
set
(
'Core
.
AggressivelyFixLt'
,
TRUE
);
$config
->
set
(
'Cache
.
DefinitionImpl'
,
'Drupal'
);
// Filter HTML doesn't allow external images, so neither will we...
// for now. This can be configured off.
$config
->
set
(
'URI
'
,
'
DisableExternalResources'
,
TRUE
);
$config
->
set
(
'URI
.
DisableExternalResources'
,
TRUE
);
if
(
!
empty
(
$_SERVER
[
'SERVER_NAME'
]))
{
// SERVER_NAME is more reliable than HTTP_HOST
$config
->
set
(
'URI
'
,
'
Host'
,
$_SERVER
[
'SERVER_NAME'
]);
$config
->
set
(
'URI
.
Host'
,
$_SERVER
[
'SERVER_NAME'
]);
}
if
(
defined
(
'LANGUAGE_RTL'
)
&&
$GLOBALS
[
'language'
]
->
direction
===
LANGUAGE_RTL
)
{
$config
->
set
(
'Attr
'
,
'
DefaultTextDir'
,
'rtl'
);
$config
->
set
(
'Attr
.
DefaultTextDir'
,
'rtl'
);
}
if
(
$config_function
=
_htmlpurifier_config_load
(
$format
))
{
...
...
@@ -288,6 +288,7 @@ function _htmlpurifier_settings($delta, $format) {
'HTML.Allowed'
,
'HTML.ForbiddenElements'
,
'HTML.ForbiddenAttributes'
,
'AutoFormat.RemoveEmpty'
,
'AutoFormat.Linkify'
,
'AutoFormat.AutoParagraph'
,
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment