Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
4fc9b4b6
Commit
4fc9b4b6
authored
Oct 19, 2015
by
陈志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正则去除内容所有html标签
parent
f1147608
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
forumThread.js
app/controllers/admin/forumThread.js
+9
-3
No files found.
app/controllers/admin/forumThread.js
View file @
4fc9b4b6
...
@@ -1137,12 +1137,18 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
...
@@ -1137,12 +1137,18 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
t_from_openId
=
thread
.
from
?
thread
.
from
.
uid
:
''
,
t_from_openId
=
thread
.
from
?
thread
.
from
.
uid
:
''
,
t_praiseNames
=
thread
.
praiseNames
,
t_praiseNames
=
thread
.
praiseNames
,
t_praiseOpenIds
=
thread
.
praiseOpenIds
;
t_praiseOpenIds
=
thread
.
praiseOpenIds
;
var
contentReplace
=
function
(
str
){
return
str
.
replace
(
/<
[^
>
]
+>/g
,
''
).
replace
(
/
[
,
\n
,
\b
,
\t]
/ig
,
''
)
}
rows
.
push
([
rows
.
push
([
t_title
,
t_title
,
t_time
,
t_time
,
t_from
,
t_from
,
t_from_openId
,
t_from_openId
,
thread
.
content
,
contentReplace
(
thread
.
content
)
,
thread
.
comment_count
.
toString
(),
thread
.
comment_count
.
toString
(),
thread
.
share_count
.
toString
(),
thread
.
share_count
.
toString
(),
thread
.
praise_count
.
toString
(),
thread
.
praise_count
.
toString
(),
...
@@ -1156,7 +1162,7 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
...
@@ -1156,7 +1162,7 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
time
=
date_format
(
comment
.
created
),
time
=
date_format
(
comment
.
created
),
openId
=
''
,
openId
=
''
,
nickName
=
''
,
nickName
=
''
,
content
=
comment
.
content
||
''
,
content
=
comment
.
content
?
contentReplace
(
comment
.
content
)
:
''
,
praiseCount
=
comment
.
praiseCount
||
0
,
praiseCount
=
comment
.
praiseCount
||
0
,
praiseNames
=
''
,
praiseNames
=
''
,
praiseOpenIds
=
''
;
praiseOpenIds
=
''
;
...
@@ -1178,7 +1184,7 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
...
@@ -1178,7 +1184,7 @@ router.get('/thread/:tid/exportComments', function(req, res, next) {
var
time
=
date_format
(
sub_comment
.
created
),
var
time
=
date_format
(
sub_comment
.
created
),
openId
=
''
,
openId
=
''
,
nickName
=
''
,
nickName
=
''
,
content
=
sub_comment
.
content
||
''
,
content
=
sub_comment
.
content
?
contentReplace
(
sub_comment
.
content
)
:
''
,
to
=
''
;
to
=
''
;
if
(
sub_comment
.
from
){
if
(
sub_comment
.
from
){
openId
=
sub_comment
.
from
.
uid
||
''
;
openId
=
sub_comment
.
from
.
uid
||
''
;
...
...
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