Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ifrah Shahid
lab-exercises
Commits
d75f3f87
Commit
d75f3f87
authored
Nov 21, 2016
by
Sorrel Harriet
Browse files
clarifying comment
parent
3d7767ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
lab-7/music-store-app/includes/functions.php
View file @
d75f3f87
...
...
@@ -7,7 +7,7 @@
(this would ideally be in includes folder)
helps protect against XSS */
function
clean_input
(
$data
)
{
$data
=
trim
(
$data
);
// strips
unnecessary characters
from beginning/end
$data
=
trim
(
$data
);
// strips
whitespace
from beginning/end
$data
=
stripslashes
(
$data
);
// remove backslashes
$data
=
htmlspecialchars
(
$data
);
// replace special characters with HTML entities
return
$data
;
...
...
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