Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve MessageDialogs and exception views as text/html (4.x) #1082

Merged

Conversation

perrinjerome
Copy link
Contributor

Now that Zope uses text/plain by default, MessageDialogs were served as text/plain. Keep compatibility by returning a special string with asHTML method, that ZPublisher.HTTPResponse.HTTPResponse.setBody understands.

MessageDialogs are deprecated and do not integrate well in Zope >= 4 ZMI, but they are used in some old products.

@perrinjerome
Copy link
Contributor Author

#1081 backported for 4.x

@perrinjerome perrinjerome force-pushed the fix/MessageDialog_asHTML_4.x branch 2 times, most recently from 5efc650 to 284111a Compare December 17, 2022 15:18
Now that Zope uses text/plain by default, MessageDialogs were served as
text/plain. Keep compatibility by returning a special string with
`asHTML` method, that ZPublisher.HTTPResponse.HTTPResponse.setBody
understands.

MessageDialogs are deprecated and do not integrate well in Zope >= 4
ZMI, but they are used in some old products.
@perrinjerome perrinjerome force-pushed the fix/MessageDialog_asHTML_4.x branch from 284111a to eb3c8c1 Compare December 17, 2022 15:25
@dataflake dataflake changed the title Restore serving MessageDialogs as text/html (4.x) Serve MessageDialogs and exception views as text/html (4.x) Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants