Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
224
Merge Requests
224
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
e4096e14
Commit
e4096e14
authored
Jul 29, 2005
by
Steven Wittens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-
#27551
: Rename check_output() to check_markup(). Needs contrib updates!
parent
e5ad13e3
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
18 deletions
+18
-18
modules/block.module
modules/block.module
+1
-1
modules/block/block.module
modules/block/block.module
+1
-1
modules/comment.module
modules/comment.module
+4
-4
modules/comment/comment.module
modules/comment/comment.module
+4
-4
modules/filter.module
modules/filter.module
+1
-1
modules/filter/filter.module
modules/filter/filter.module
+1
-1
modules/node.module
modules/node.module
+2
-2
modules/node/node.module
modules/node/node.module
+2
-2
modules/profile.module
modules/profile.module
+1
-1
modules/profile/profile.module
modules/profile/profile.module
+1
-1
No files found.
modules/block.module
View file @
e4096e14
...
...
@@ -104,7 +104,7 @@ function block_block($op = 'list', $delta = 0, $edit = array()) {
case
'view'
:
$block
=
db_fetch_object
(
db_query
(
'SELECT * FROM {boxes} WHERE bid = %d'
,
$delta
));
$data
[
'subject'
]
=
check_plain
(
$block
->
title
);
$data
[
'content'
]
=
check_
output
(
$block
->
body
,
$block
->
format
,
FALSE
);
$data
[
'content'
]
=
check_
markup
(
$block
->
body
,
$block
->
format
,
FALSE
);
return
$data
;
}
}
...
...
modules/block/block.module
View file @
e4096e14
...
...
@@ -104,7 +104,7 @@ function block_block($op = 'list', $delta = 0, $edit = array()) {
case
'view'
:
$block
=
db_fetch_object
(
db_query
(
'SELECT * FROM {boxes} WHERE bid = %d'
,
$delta
));
$data
[
'subject'
]
=
check_plain
(
$block
->
title
);
$data
[
'content'
]
=
check_
output
(
$block
->
body
,
$block
->
format
,
FALSE
);
$data
[
'content'
]
=
check_
markup
(
$block
->
body
,
$block
->
format
,
FALSE
);
return
$data
;
}
}
...
...
modules/comment.module
View file @
e4096e14
...
...
@@ -277,7 +277,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) {
$text
=
''
;
$comments
=
db_query
(
'SELECT subject, comment, format FROM {comments} WHERE nid = %d AND status = %d'
,
$node
->
nid
,
COMMENT_PUBLISHED
);
while
(
$comment
=
db_fetch_object
(
$comments
))
{
$text
.
=
'<h2>'
.
check_plain
(
$comment
->
subject
)
.
'</h2>'
.
check_
output
(
$comment
->
comment
,
$comment
->
format
,
FALSE
);
$text
.
=
'<h2>'
.
check_plain
(
$comment
->
subject
)
.
'</h2>'
.
check_
markup
(
$comment
->
comment
,
$comment
->
format
,
FALSE
);
}
return
$text
;
...
...
@@ -472,8 +472,8 @@ function comment_validate($edit) {
// 1) Filter it into HTML
// 2) Strip out all HTML tags
// 3) Convert entities back to plain-text.
// Note: format is checked by check_
output
().
$edit
[
'subject'
]
=
truncate_utf8
(
decode_entities
(
strip_tags
(
check_
output
(
$edit
[
'comment'
],
$edit
[
'format'
]))),
29
,
TRUE
);
// Note: format is checked by check_
markup
().
$edit
[
'subject'
]
=
truncate_utf8
(
decode_entities
(
strip_tags
(
check_
markup
(
$edit
[
'comment'
],
$edit
[
'format'
]))),
29
,
TRUE
);
}
// Validate the comment's body.
...
...
@@ -1458,7 +1458,7 @@ function theme_comment_view($comment, $links = '', $visible = 1) {
// Switch to folded/unfolded view of the comment
if
(
$visible
)
{
$comment
->
comment
=
check_
output
(
$comment
->
comment
,
$comment
->
format
,
FALSE
);
$comment
->
comment
=
check_
markup
(
$comment
->
comment
,
$comment
->
format
,
FALSE
);
$output
.
=
theme
(
'comment'
,
$comment
,
$links
);
}
else
{
...
...
modules/comment/comment.module
View file @
e4096e14
...
...
@@ -277,7 +277,7 @@ function comment_nodeapi(&$node, $op, $arg = 0) {
$text
=
''
;
$comments
=
db_query
(
'SELECT subject, comment, format FROM {comments} WHERE nid = %d AND status = %d'
,
$node
->
nid
,
COMMENT_PUBLISHED
);
while
(
$comment
=
db_fetch_object
(
$comments
))
{
$text
.
=
'<h2>'
.
check_plain
(
$comment
->
subject
)
.
'</h2>'
.
check_
output
(
$comment
->
comment
,
$comment
->
format
,
FALSE
);
$text
.
=
'<h2>'
.
check_plain
(
$comment
->
subject
)
.
'</h2>'
.
check_
markup
(
$comment
->
comment
,
$comment
->
format
,
FALSE
);
}
return
$text
;
...
...
@@ -472,8 +472,8 @@ function comment_validate($edit) {
// 1) Filter it into HTML
// 2) Strip out all HTML tags
// 3) Convert entities back to plain-text.
// Note: format is checked by check_
output
().
$edit
[
'subject'
]
=
truncate_utf8
(
decode_entities
(
strip_tags
(
check_
output
(
$edit
[
'comment'
],
$edit
[
'format'
]))),
29
,
TRUE
);
// Note: format is checked by check_
markup
().
$edit
[
'subject'
]
=
truncate_utf8
(
decode_entities
(
strip_tags
(
check_
markup
(
$edit
[
'comment'
],
$edit
[
'format'
]))),
29
,
TRUE
);
}
// Validate the comment's body.
...
...
@@ -1458,7 +1458,7 @@ function theme_comment_view($comment, $links = '', $visible = 1) {
// Switch to folded/unfolded view of the comment
if
(
$visible
)
{
$comment
->
comment
=
check_
output
(
$comment
->
comment
,
$comment
->
format
,
FALSE
);
$comment
->
comment
=
check_
markup
(
$comment
->
comment
,
$comment
->
format
,
FALSE
);
$output
.
=
theme
(
'comment'
,
$comment
,
$links
);
}
else
{
...
...
modules/filter.module
View file @
e4096e14
...
...
@@ -671,7 +671,7 @@ function filter_list_format($format) {
* showing content that is not (yet) stored in the database (eg. upon preview),
* set to TRUE so the user's permissions are checked.
*/
function
check_
output
(
$text
,
$format
=
FILTER_FORMAT_DEFAULT
,
$check
=
TRUE
)
{
function
check_
markup
(
$text
,
$format
=
FILTER_FORMAT_DEFAULT
,
$check
=
TRUE
)
{
// When $check = true, do an access check on $format.
if
(
isset
(
$text
)
&&
(
!
$check
||
filter_access
(
$format
)))
{
if
(
$format
==
FILTER_FORMAT_DEFAULT
)
{
...
...
modules/filter/filter.module
View file @
e4096e14
...
...
@@ -671,7 +671,7 @@ function filter_list_format($format) {
* showing content that is not (yet) stored in the database (eg. upon preview),
* set to TRUE so the user's permissions are checked.
*/
function
check_
output
(
$text
,
$format
=
FILTER_FORMAT_DEFAULT
,
$check
=
TRUE
)
{
function
check_
markup
(
$text
,
$format
=
FILTER_FORMAT_DEFAULT
,
$check
=
TRUE
)
{
// When $check = true, do an access check on $format.
if
(
isset
(
$text
)
&&
(
!
$check
||
filter_access
(
$format
)))
{
if
(
$format
==
FILTER_FORMAT_DEFAULT
)
{
...
...
modules/node.module
View file @
e4096e14
...
...
@@ -510,10 +510,10 @@ function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) {
function
node_prepare
(
$node
,
$teaser
=
FALSE
)
{
$node
->
readmore
=
(
strlen
(
$node
->
teaser
)
<
strlen
(
$node
->
body
));
if
(
$teaser
==
FALSE
)
{
$node
->
body
=
check_
output
(
$node
->
body
,
$node
->
format
,
FALSE
);
$node
->
body
=
check_
markup
(
$node
->
body
,
$node
->
format
,
FALSE
);
}
else
{
$node
->
teaser
=
check_
output
(
$node
->
teaser
,
$node
->
format
,
FALSE
);
$node
->
teaser
=
check_
markup
(
$node
->
teaser
,
$node
->
format
,
FALSE
);
}
return
$node
;
}
...
...
modules/node/node.module
View file @
e4096e14
...
...
@@ -510,10 +510,10 @@ function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) {
function
node_prepare
(
$node
,
$teaser
=
FALSE
)
{
$node
->
readmore
=
(
strlen
(
$node
->
teaser
)
<
strlen
(
$node
->
body
));
if
(
$teaser
==
FALSE
)
{
$node
->
body
=
check_
output
(
$node
->
body
,
$node
->
format
,
FALSE
);
$node
->
body
=
check_
markup
(
$node
->
body
,
$node
->
format
,
FALSE
);
}
else
{
$node
->
teaser
=
check_
output
(
$node
->
teaser
,
$node
->
format
,
FALSE
);
$node
->
teaser
=
check_
markup
(
$node
->
teaser
,
$node
->
format
,
FALSE
);
}
return
$node
;
}
...
...
modules/profile.module
View file @
e4096e14
...
...
@@ -246,7 +246,7 @@ function profile_view_field($user, $field) {
case
'textfield'
:
return
check_plain
(
$value
);
case
'textarea'
:
return
check_
output
(
$value
);
return
check_
markup
(
$value
);
case
'selection'
:
return
$browse
?
l
(
$value
,
"profile/
$field->name
/
$value
"
)
:
check_plain
(
$value
);
case
'checkbox'
:
...
...
modules/profile/profile.module
View file @
e4096e14
...
...
@@ -246,7 +246,7 @@ function profile_view_field($user, $field) {
case
'textfield'
:
return
check_plain
(
$value
);
case
'textarea'
:
return
check_
output
(
$value
);
return
check_
markup
(
$value
);
case
'selection'
:
return
$browse
?
l
(
$value
,
"profile/
$field->name
/
$value
"
)
:
check_plain
(
$value
);
case
'checkbox'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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