[
http://jira.magnolia-cms.com/browse/MGNLFORM-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=29099#action_29099
]
Grégory Joseph edited comment on MGNLFORM-52 at 7/19/10 5:51 PM:
-----------------------------------------------------------------
After a quick investigation, it looks like those fields are indeed encoded
twice, but only in the context of the public-user-registration forms, or maybe
some others; the "default" form paragraphs of the form module are of type
{{freemarker}} and not {{stk}}, and as such do not go through the
{{STKParagraphRenderer.wrapNodeForTemplate()}} code.
When using the contact form of the stk demo, for example, the double-encoding
issue does not happen.
The "problem" is that the same {{ftl}} template is used in both types of
paragraphs.
To avoid further confusion and problems, we should revert the current fix. One
possible other solution is to change the p-u-r integration paragraphs to *not*
be of type {{stk}}, but these being currently defined *in* STK, it might not
help make things clearer either. Duplicating the {{ftl}} files is not desirable
either. Since we need an overhaul of the stk-pur integration, we might want to
take that opportunity to fix this issue in a more acceptable fashion too.
Furthermore, we need to consider that 1) {{HTMLEncodingContentWrapper}} is
applied before the Freemarker {{?htlml}} built-in 2)
{{HTMLEncodingContentWrapper}} currently encodes any character into its
html-entity equivalent, while Freemarker's {{?html}} built-in only encodes
{{<}}, {{>}}, {{"}} and {{&}}. I'm not sure which behavior should be favored.
ref: {{freemarker.core.BuiltIn.htmlBI}}
was (Author: gjoseph):
After a quick investigation, it looks like those fields are indeed encoded
twice, but only in the context of the public-user-registration forms, or maybe
some others; the "default" form paragraphs of the form module are of type
{{freemarker}} and not {{stk}}, and as such do not go through the
{{STKParagraphRenderer.wrapNodeForTemplate()}} code.
When using the contact form of the stk demo, for example, the double-encoding
issue does not happen.
The "problem" is that the same {{ftl}} template is used in both types of
paragraphs.
To avoid further confusion and problems, we should revert the current fix. One
possible other solution is to change the p-u-r integration paragraphs to *not*
be of type {{stk}}, but these being currently defined *in* STK, it might not
help make things clearer either. Duplicating the {{ftl}} files is not desirable
either. Since we need an overhaul of the stk-pur integration, we might want to
take that opportunity to fix this issue in a more acceptable fashion too.
> Form paragraph title and text are encoded twice
> ------------------------------------------------
>
> Key: MGNLFORM-52
> URL: http://jira.magnolia-cms.com/browse/MGNLFORM-52
> Project: Magnolia Form Module
> Issue Type: Bug
> Affects Versions: 1.1.1
> Reporter: Zdenek Skodik
> Assignee: Jan Haderka
> Fix For: 1.1.2
>
>
> * at {{STKParagraphRenderer.wrapNodeForTemplate() - STKUtil.encode()}}
> * and at form.ftl
> As a result, if one enters characters which have an html-entity equivalent
> (angle brackets, ampersand, accented letters, ...), the browser displays text
> such as "{{the &auml; &gt; text}}" (instead of "{{the ä < text}}" in
> this example)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------