diff options
author | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2021-06-01 11:19:25 +0200 |
---|---|---|
committer | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2021-06-01 11:19:25 +0200 |
commit | 3fde4b0164d1eb2f3fb32718b4011fff2b2b80ed (patch) | |
tree | 01795953c24351d93cf9651455440cdbeba27f62 /pdf-as-web | |
parent | fef273a399d7ce891262d217cc04e4aea032c919 (diff) | |
download | pdf-as-4-3fde4b0164d1eb2f3fb32718b4011fff2b2b80ed.tar.gz pdf-as-4-3fde4b0164d1eb2f3fb32718b4011fff2b2b80ed.tar.bz2 pdf-as-4-3fde4b0164d1eb2f3fb32718b4011fff2b2b80ed.zip |
filter everything from placeholder id except 0-9 during placeholder generation
Diffstat (limited to 'pdf-as-web')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java index 5f2dc95c..6e80fad8 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java @@ -73,9 +73,11 @@ public class PlaceholderGeneratorServlet extends HttpServlet implements Placehol String filename = "placeholder"; if(id != null && !id.isEmpty()) { - id = id.replaceAll("[^a-zA-Z0-9]", "_"); - buildString = buildString + ";" + SignaturePlaceholderData.ID_KEY + "=" + id; - filename = filename + "_" + id; + id = id.replaceAll("[^0-9]", ""); + if(id != null && !id.isEmpty()) { + buildString = buildString + ";" + SignaturePlaceholderData.ID_KEY + "=" + id; + filename = filename + "_" + id; + } } if(profile != null && !profile.isEmpty()) { |