Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
王水玲
7 years ago
Commit
0eb95770e029f9ad4c33e797a49e8823f14a1423
1 parent
9c25a4c3
xss
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
public/js/header.js
utils/cleanHtml.js
public/js/header.js
View file @
0eb9577
...
...
@@ -284,7 +284,7 @@ function updateLoginInfo(data) {
if
(
data
.
curLevel
*
1
===
3
)
{
data
.
vip3
=
true
;
}
console
.
log
(
cleanHtml
)
data
.
profileName
=
cleanHtml
.
htmlEncode
(
data
.
profileName
);
$tool
.
find
(
'.simple-user-center'
).
html
(
centerFn
(
data
));
}
...
...
utils/cleanHtml.js
View file @
0eb9577
...
...
@@ -24,6 +24,7 @@ exports.htmlDecode = function(txt) {
};
exports
.
htmlEncode
=
function
(
str
)
{
console
.
log
(
str
)
str
=
str
||
''
;
return
str
.
replace
(
re
,
function
(
s
)
{
switch
(
s
)
{
...
...
Please
register
or
login
to post a comment