Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7577F200D37 for ; Thu, 9 Nov 2017 18:19:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 73EAB1609C8; Thu, 9 Nov 2017 17:19:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BA2C2160BEF for ; Thu, 9 Nov 2017 18:19:09 +0100 (CET) Received: (qmail 41020 invoked by uid 500); 9 Nov 2017 17:19:03 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 41010 invoked by uid 99); 9 Nov 2017 17:19:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Nov 2017 17:19:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0787F1807B6 for ; Thu, 9 Nov 2017 17:19:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id gHL2EMfssILv for ; Thu, 9 Nov 2017 17:19:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id EE55A6112D for ; Thu, 9 Nov 2017 17:19:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3ED49E0EEF for ; Thu, 9 Nov 2017 17:19:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 83226240EE for ; Thu, 9 Nov 2017 17:19:00 +0000 (UTC) Date: Thu, 9 Nov 2017 17:19:00 +0000 (UTC) From: "Hudson (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4888) HTML escaping on the text tag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 09 Nov 2017 17:19:10 -0000 [ https://issues.apache.org/jira/browse/WW-4888?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1624608= 7#comment-16246087 ]=20 Hudson commented on WW-4888: ---------------------------- SUCCESS: Integrated in Jenkins build Struts-master-JDK7 #54 (See [https://b= uilds.apache.org/job/Struts-master-JDK7/54/]) WW-4888 add escaping options to text tag (stefaan.dutry: rev cde63169f0b871= 7fc29355509f5ac365a843993a) * (edit) core/src/main/java/org/apache/struts2/views/jsp/TextTag.java * (edit) core/src/test/java/org/apache/struts2/views/jsp/TextTagTest.java * (edit) core/src/site/resources/tags/text.html * (edit) core/src/main/java/org/apache/struts2/components/Text.java * (edit) core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java * (edit) core/src/test/resources/org/apache/struts2/TestAction.properties > HTML escaping on the text tag > ----------------------------- > > Key: WW-4888 > URL: https://issues.apache.org/jira/browse/WW-4888 > Project: Struts 2 > Issue Type: Improvement > Components: Core Tags > Affects Versions: 2.5.13 > Reporter: Pierre-Yves Soblet > Fix For: 2.5.14 > > Attachments: text-vs-property.png > > > Assuming an i18n bundle with the following entry: > {code} > sample.message=3DThis is a dumb smiley <:=E2=80=91| > {code} > The following tag produces a value that is properly escaped for HTML: > {code} > > {code} > However, the *text* tag does not escape the "<" character and cannot be s= afely used in HTML: > {code} > > {code} > The text tag documentation (http://struts.apache.org/tag-developers/text-= tag.html) neither states HTML escaping is performed nor warns it is not. > In the FAQ, the "How to escape special chars in resource bundles" article= (https://struts.apache.org/docs/how-to-escape-special-chars-in-resource-bu= ndles.html) describes how to escape special characters of the MessageFormat= syntax but does not mention HTML escaping. > I assume HTML escaping on the text tag cannot be added now without breaki= ng backward compatibility, but maybe an "escapeHtml" attribute could be add= ed (as with the property tag)?=20 -- This message was sent by Atlassian JIRA (v6.4.14#64029)