• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / displaytag / 1753

12 Feb 2026 03:17AM UTC coverage: 77.321% (-0.01%) from 77.334%
1753

push

github

web-flow
Merge pull request #1102 from hazendaz/renovate/javax-support-logback-monorepo

Update dependency ch.qos.logback:logback-classic to v1.5.29 (javax-support)

1438 of 2003 branches covered (71.79%)

Branch coverage included in aggregate %.

4034 of 5074 relevant lines covered (79.5%)

0.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

54.55
/displaytag/src/main/java/org/displaytag/decorator/EscapeXmlColumnDecorator.java
1
/*
2
 * SPDX-License-Identifier: MIT
3
 * See LICENSE file for details.
4
 *
5
 * Copyright 2002-2026 Fabrizio Giustina, the Displaytag team
6
 */
7
package org.displaytag.decorator;
8

9
import javax.servlet.jsp.PageContext;
10

11
import org.apache.commons.text.StringEscapeUtils;
12
import org.displaytag.properties.MediaTypeEnum;
13

14
/**
15
 * This takes the string that is passed in, and escapes html tags and entities. Only operates on "html" or "xml" media.
16
 */
17
public class EscapeXmlColumnDecorator implements DisplaytagColumnDecorator {
1✔
18

19
    /**
20
     * Instance used for the "escapeXml" tag attribute.
21
     */
22
    public static final DisplaytagColumnDecorator INSTANCE = new EscapeXmlColumnDecorator();
1✔
23

24
    /**
25
     * Decorate.
26
     *
27
     * @param columnValue
28
     *            the column value
29
     * @param pageContext
30
     *            the page context
31
     * @param media
32
     *            the media
33
     *
34
     * @return the object
35
     *
36
     * @see org.displaytag.decorator.DisplaytagColumnDecorator#decorate(Object, PageContext, MediaTypeEnum)
37
     */
38
    @Override
39
    public Object decorate(final Object columnValue, final PageContext pageContext, final MediaTypeEnum media) {
40

41
        if (columnValue == null || !media.equals(MediaTypeEnum.HTML) && !media.equals(MediaTypeEnum.XML)) {
1!
42
            return columnValue;
×
43
        }
44

45
        return StringEscapeUtils.escapeXml10(columnValue.toString());
1✔
46
    }
47

48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc