Skip to content

Commit cc49150

Browse files
authored
Merge pull request #58 from contentstack/snyk/cs-44685-upgrade
Snyk/cs 44685 upgrade
2 parents 12e4ab6 + 8b3f52c commit cc49150

File tree

4 files changed

+30
-10
lines changed

4 files changed

+30
-10
lines changed

.github/workflows/maven-publish.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,32 @@ jobs:
1313
- name: Set up Maven Central Repository
1414
uses: actions/setup-java@v3
1515
with:
16-
java-version: '8'
16+
java-version: '11'
1717
distribution: 'adopt'
1818
server-id: ossrh
19-
server-username: ${{ secrets.OSSRH_USERNAME }}
20-
server-password: ${{ secrets.OSSRH_TOKEN }}
21-
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
19+
server-username: MAVEN_USERNAME
20+
server-password: MAVEN_PASSWORD
21+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
22+
gpg-passphrase: GPG_PASSPHRASE
2223
- name: Publish package
23-
run: mvn --batch-mode deploy
24+
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy
25+
env:
26+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
27+
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
28+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
2429
publish-github:
2530
runs-on: ubuntu-latest
2631
steps:
2732
- uses: actions/checkout@v3
2833
- name: Set up Java for publishing to GitHub Packages
2934
uses: actions/setup-java@v3
3035
with:
31-
java-version: '8'
36+
java-version: '11'
3237
distribution: 'adopt'
3338
server-id: github
39+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
40+
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
3441
- name: Publish to GitHub Packages
35-
run: mvn --batch-mode deploy
42+
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy
3643
env:
3744
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
A brief description of what changes project contains
44

5+
## April 23, 2024
6+
57
#### v1.2.8
68

79
- added surefire plugin to generate test reports
10+
- Fixed Snyk issues
811

912
## March 24, 2024
1013

pom.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
2121
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
2222
<junit.version>4.13.2</junit.version>
23-
<jsoup.version>1.16.1</jsoup.version>
23+
<jsoup.version>1.16.2</jsoup.version>
2424
<json.simple.version>1.1.1</json.simple.version>
2525
<maven-site-plugin.version>3.3</maven-site-plugin.version>
2626
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
2727
<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
2828
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
2929
<validation-version>2.0.1.Final</validation-version>
3030
<json-version>20240205</json-version>
31-
<spring-web-version>6.0.18</spring-web-version>
32-
<org.apache.commons-text>1.10.0</org.apache.commons-text>
31+
<spring-web-version>6.0.19</spring-web-version>
32+
<org.apache.commons-text>1.11.0</org.apache.commons-text>
3333
</properties>
3434

3535
<developers>
@@ -219,6 +219,12 @@
219219
<goals>
220220
<goal>sign</goal>
221221
</goals>
222+
<configuration>
223+
<gpgArguments>
224+
<arg>--pinentry-mode</arg>
225+
<arg>loopback</arg>
226+
</gpgArguments>
227+
</configuration>
222228
</execution>
223229
</executions>
224230
</plugin>

src/main/java/com/contentstack/utils/render/DefaultOption.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ public String renderNode(String nodeType, JSONObject nodeObject, NodeCallback ca
109109
case "img":
110110
String assetLink = getNodeStr(nodeObject, "asset-link");
111111
if (!assetLink.isEmpty()) {
112+
JSONObject attrs = nodeObject.optJSONObject("attrs");
113+
if (attrs.has("link")) {
114+
return "<a href=\"" + escapeInjectHtml(nodeObject, "link") + "\" />" + "<img" + strAttrs + " src=\"" + escapeInjectHtml(nodeObject, "asset-link") + "\" />" + children + "</a>";
115+
}
112116
return "<img" + strAttrs + " src=\"" + escapeInjectHtml(nodeObject, "asset-link") + "\" />" + children;
113117
}
114118
return "<img" + strAttrs + " src=\"" + escapeInjectHtml(nodeObject, "src") + "\" />" + children;

0 commit comments

Comments
 (0)