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 6cf50b81
authored
Mar 17, 2026
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaikan validasi form untuk menghapus spasi pada input HTML
1 parent
35a33d96
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
opensipkd/base/views/base_views.py
opensipkd/base/views/base_views.py
View file @
6cf50b8
...
@@ -306,7 +306,7 @@ class BaseView(object):
...
@@ -306,7 +306,7 @@ class BaseView(object):
"""Digunakan untuk memvalidasi form sebelum disubmit"""
"""Digunakan untuk memvalidasi form sebelum disubmit"""
exc
=
colander
.
Invalid
(
form
,
"Form tidak valid"
)
exc
=
colander
.
Invalid
(
form
,
"Form tidak valid"
)
for
k
,
v
in
value
.
items
():
for
k
,
v
in
value
.
items
():
if
v
and
self
.
html_tag_cleaner
and
isinstance
(
v
,
str
)
and
v
!=
""
:
if
v
and
self
.
html_tag_cleaner
and
isinstance
(
v
,
str
)
and
v
.
strip
()
!=
""
:
try
:
try
:
value
[
k
]
=
lxml
.
html
.
fromstring
(
v
)
.
text_content
()
value
[
k
]
=
lxml
.
html
.
fromstring
(
v
)
.
text_content
()
except
Exception
as
e
:
except
Exception
as
e
:
...
@@ -964,7 +964,7 @@ class BaseView(object):
...
@@ -964,7 +964,7 @@ class BaseView(object):
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
():
for
k
,
v
in
values
.
items
():
if
v
and
self
.
html_tag_cleaner
and
isinstance
(
v
,
str
)
and
v
!=
""
:
if
v
and
self
.
html_tag_cleaner
and
isinstance
(
v
,
str
)
and
v
.
strip
()
!=
""
:
try
:
try
:
values
[
k
]
=
lxml
.
html
.
fromstring
(
v
)
.
text_content
()
values
[
k
]
=
lxml
.
html
.
fromstring
(
v
)
.
text_content
()
except
Exception
as
e
:
except
Exception
as
e
:
...
@@ -1020,7 +1020,7 @@ class BaseView(object):
...
@@ -1020,7 +1020,7 @@ class BaseView(object):
values
[
k
]
=
v
values
[
k
]
=
v
for
k
,
v
in
values
.
items
():
for
k
,
v
in
values
.
items
():
if
v
and
self
.
html_tag_cleaner
and
isinstance
(
v
,
str
)
and
v
!=
""
:
if
v
and
self
.
html_tag_cleaner
and
isinstance
(
v
,
str
)
and
v
.
strip
()
!=
""
:
try
:
try
:
values
[
k
]
=
lxml
.
html
.
fromstring
(
v
)
.
text_content
()
values
[
k
]
=
lxml
.
html
.
fromstring
(
v
)
.
text_content
()
except
Exception
as
e
:
except
Exception
as
e
:
...
...
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