Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
c9eea8a6
Commit
c9eea8a6
authored
Apr 02, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! web_renderjs_ui: py3
parent
41f523f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/MailHost_redirectPageToURLFromLastMessage.py
...erjs_ui_test/MailHost_redirectPageToURLFromLastMessage.py
+5
-6
No files found.
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/MailHost_redirectPageToURLFromLastMessage.py
View file @
c9eea8a6
last_message
=
context
.
getLastLog
()[
-
1
]
line_list
=
filter
(
None
,
last_message
.
replace
(
"=
\
n
"
,
""
).
split
(
"
\
n
"
))
for
line
in
line_list
:
if
"http"
in
line
:
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
line
.
replace
(
"=3D"
,
"="
))
import
re
from
Products.ERP5Type.Utils
import
bytes2str
last_message_text
=
bytes2str
(
context
.
getMessageList
()[
-
1
][
2
])
__traceback_info__
=
last_message_text
raise
RuntimeError
(
"URL not found in the email"
)
container
.
REQUEST
.
RESPONSE
.
redirect
(
re
.
findall
(
r"http:.*"
,
bytes2str
(
last_message_text
))[
0
]
)
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