Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 35ed8cd0
authored
Mar 17, 2026
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaikan remove htmltag
1 parent
95f22e7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletions
opensipkd/base/views/base_views.py
opensipkd/base/views/base_views.py
View file @
35ed8cd
...
@@ -963,6 +963,15 @@ class BaseView(object):
...
@@ -963,6 +963,15 @@ class BaseView(object):
log
.
debug
(
values
)
log
.
debug
(
values
)
values
.
pop
(
"id"
,
None
)
values
.
pop
(
"id"
,
None
)
self
.
ses
[
"old_email"
]
=
user
and
user
.
email
or
None
self
.
ses
[
"old_email"
]
=
user
and
user
.
email
or
None
for
k
,
v
in
values
.
items
():
if
v
and
self
.
html_tag_cleaner
and
isinstance
(
v
,
str
)
and
v
!=
""
:
try
:
values
[
k
]
=
lxml
.
html
.
fromstring
(
v
)
.
text_content
()
except
Exception
as
e
:
msg
=
f
"Error cleaning HTML for key {k}: {e}"
log
.
error
(
msg
)
raise
Exception
(
msg
)
from
e
if
not
row
:
if
not
row
:
row
=
self
.
table
()
row
=
self
.
table
()
row
.
created
=
datetime
.
now
()
row
.
created
=
datetime
.
now
()
...
@@ -1009,7 +1018,16 @@ class BaseView(object):
...
@@ -1009,7 +1018,16 @@ class BaseView(object):
if
k
not
in
values
:
if
k
not
in
values
:
if
v
:
if
v
:
values
[
k
]
=
v
values
[
k
]
=
v
for
k
,
v
in
values
.
items
():
if
v
and
self
.
html_tag_cleaner
and
isinstance
(
v
,
str
)
and
v
!=
""
:
try
:
values
[
k
]
=
lxml
.
html
.
fromstring
(
v
)
.
text_content
()
except
Exception
as
e
:
msg
=
f
"Error cleaning HTML for key {k}: {e}"
log
.
error
(
msg
)
raise
Exception
(
msg
)
from
e
return
self
.
save
(
values
,
self
.
req
.
user
,
row
)
return
self
.
save
(
values
,
self
.
req
.
user
,
row
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment