2013/01/27

Newline to BR in Description Field

Usually we want newlines in the description field be interpreted as <br /> for Plone contents. Here is a qucik trick:

Products/CMFPlone/skins/plone_kss/kss_generic_macros.pt
37c37,38
< templateId='kss_generic_macros', macro='description-field-view');"
---
> templateId='kss_generic_macros', macro='description-field-view');
> pps modules/Products.PythonScripts.standard"
41c42
< tal:replace="context/Description">
---
> tal:replace="structure python:pps.newline_to_br(pps.html_quote(context.Description()))">

No comments: