Skip to content

Commit

Permalink
Merge pull request #5 from ro-kr/render-null-as-empty
Browse files Browse the repository at this point in the history
Render null as empty
  • Loading branch information
kohsuke committed Mar 24, 2022
2 parents 6d5c4b9 + 0862e81 commit 5ebd825
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.424</version>
<version>4.33</version>
</parent>

<properties>
<jenkins.version>2.289.1</jenkins.version>
<java.level>8</java.level>
</properties>

<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>anything-goes-formatter</artifactId>
<version>1.1-SNAPSHOT</version>
<packaging>hpi</packaging>
<url>https://wiki.jenkins-ci.org/pages/viewpage.action?pageId=60915753</url>
<url>https://wiki.jenkins-ci.org/JENKINS/60915753.html</url>

<!-- get every artifact through maven.glassfish.org, which proxies all the artifacts that we need -->
<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ public UnsafeMarkupFormatter() {

@Override
public void translate(String markup, Writer output) throws IOException {
output.write(markup);
if (markup != null) {
output.write(markup);
}
}

@Extension
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/index.jelly
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<div>
This plugin adds a markup formatter that's unsafe but allows more powerful
HTML manipulation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:description>
This markup formatter supports arbitrary HTML, including potentially dangerous elements like "script"
Expand Down

0 comments on commit 5ebd825

Please sign in to comment.