diff --git a/comments/curabitur%20vel%20tempus%20ex.comment b/comments/curabitur%20vel%20tempus%20ex.comment index a0ecc68..66d567a 100644 --- a/comments/curabitur%20vel%20tempus%20ex.comment +++ b/comments/curabitur%20vel%20tempus%20ex.comment @@ -1,3 +1,7 @@ -1 +3 New%20article%20test%20hype!

First! New%20article%20comment2022-07-27T20:28:16.622522Z[Etc/UTC];GREEN +%5EI%5E%20*am*_%20now_~%20testing~%20%5Ball%5D%20the%20tags.%F0%9F%98%8A%F0%9F%98%94%F0%9F%91%8D%E2%9D%A4%EF%B8%8F%F0%9F%98%A1 +Test%20Tags2022-07-28T18:35:21.171183Z[Etc/UTC];RED +%5E%5EBold%20test%5E%5E +2022-07-28T19:02:38.122403Z[Etc/UTC];GREEN diff --git a/comments/sigplace1.comment b/comments/sigplace1.comment index 76ff8eb..f4d6437 100644 --- a/comments/sigplace1.comment +++ b/comments/sigplace1.comment @@ -1,4 +1,4 @@ -19 +35 That is a great idea! username,17May2021 08:29:10;GREEN That is a great idea! <p>There used to be folks I worked with who would use the same technique, and it worked great!</p> @@ -37,3 +37,35 @@ sffdsadsavdavdav

Everything%20looks%20good!

I%20am%20happy%20n feqfeq2022-07-27T20:26:24.402781Z[Etc/UTC];YELLOW sfdvdsewfagadavasvdas abdbsa2022-07-27T20:27:07.342320Z[Etc/UTC];YELLOW +%5E%5ETest%20bold%20text%5E%5E +bfdabda2022-07-28T19:07:53.017136Z[Etc/UTC];GREEN +%5E%5Etest%20bold%20tex%5E%5Et +gda2022-07-28T19:11:24.304502Z[Etc/UTC];GREEN +try%20bolding%20t%5E%5Eext%20in%20the%20midd%5E%5Ele%20of%20the%20box. +bdsabdsa2022-07-28T19:16:31.400155Z[Etc/UTC];GREEN +5E%5Ebold%20text5E%5E +testing%20bold2022-07-28T19:23:11.839033Z[Etc/UTC];GREEN +est +test2022-07-28T19:24:58.411339Z[Etc/UTC];GREEN +est%20bolded%20text +test2022-07-28T19:25:29.514450Z[Etc/UTC];GREEN +bold%20text +fdsa2022-07-28T19:25:51.209453Z[Etc/UTC];GREEN +Italics +2022-07-28T19:26:08.219916Z[Etc/UTC];GREEN +underlinea +2022-07-28T19:26:14.074367Z[Etc/UTC];GREEN +~
test a code block
~

+2022-07-28T19:47:56.447910Z[Etc/UTC];GREEN +~
vdsavdsavdsafdsafdsa fdsavds
~ +2022-07-28T19:52:23.484146Z[Etc/UTC];GREEN +test%20a%20link +2022-07-28T19:53:09.504476Z[Etc/UTC];GREEN +test%20a%20link +2022-07-28T19:55:42.857935Z[Etc/UTC];GREEN +http%3A%2F%2Fgoogle.com

Link%20with%20spaces +2022-07-28T19:56:20.531467Z[Etc/UTC];GREEN +~
This is a code block
~

~
This is another code block!
~ +2022-07-28T19:56:50.050699Z[Etc/UTC];GREEN +%F0%9F%98%8AItalicizedBolded%20Both%20All%20three +2022-07-28T19:57:21.107759Z[Etc/UTC];GREEN diff --git a/out/DIRECTORY_LISTING b/out/DIRECTORY_LISTING index f63120f..5dee9f3 100644 --- a/out/DIRECTORY_LISTING +++ b/out/DIRECTORY_LISTING @@ -17,14 +17,14 @@
-

Directory Listing for /

📁.. (Previous Directory)
📁articles 2022-07-28T18:33:07.36118Z gitpod 4096
-
🗎codeBackground 2022-07-28T18:33:07.30118Z gitpod 8812
-
📁images 2022-07-28T18:33:07.35718Z gitpod 58
-
🗎otherpage.html 2022-07-28T18:33:07.30118Z gitpod 7116
-
🗎reset.css 2022-07-28T18:33:07.30518Z gitpod 7259
-
🗎sig.css 2022-07-28T18:33:07.30918Z gitpod 15463
-
🗎testfile.html 2022-07-28T18:33:07.32118Z gitpod 6977
-
🗎uploadform.html 2022-07-28T18:33:07.32118Z gitpod 7061
+

Directory Listing for /

📁.. (Previous Directory)
📁articles 2022-07-28T19:56:08.84481Z gitpod 4096
+
🗎codeBackground 2022-07-28T19:56:08.748811Z gitpod 8822
+
📁images 2022-07-28T19:56:08.84081Z gitpod 58
+
🗎otherpage.html 2022-07-28T19:56:08.752811Z gitpod 7126
+
🗎reset.css 2022-07-28T19:56:08.756811Z gitpod 7269
+
🗎sig.css 2022-07-28T19:56:08.764811Z gitpod 15473
+
🗎testfile.html 2022-07-28T19:56:08.77681Z gitpod 6987
+
🗎uploadform.html 2022-07-28T19:56:08.78081Z gitpod 7071
diff --git a/out/articles/DIRECTORY_LISTING b/out/articles/DIRECTORY_LISTING index 2d82a03..545eabc 100644 --- a/out/articles/DIRECTORY_LISTING +++ b/out/articles/DIRECTORY_LISTING @@ -17,13 +17,13 @@
-

Directory Listing for /articles/

📁.. (Previous Directory)
🗎Love Live! Custom Arcade Controller.article 2022-07-28T18:33:06.88518Z gitpod 6716
-
🗎curabitur vel tempus ex.article 2022-07-28T18:33:06.90918Z gitpod 6925
-
🗎sigplace1.article 2022-07-28T18:33:07.29318Z gitpod 87025
-
📁test articles 2022-07-28T18:33:07.34918Z gitpod 147
-
🗎Love Live! Custom Arcade Controller.article.html 2022-07-28T18:33:07.32518Z gitpod 7433
-
🗎curabitur vel tempus ex.article.html 2022-07-28T18:33:07.33318Z gitpod 7642
-
🗎sigplace1.article.html 2022-07-28T18:33:07.34118Z gitpod 87742
+

Directory Listing for /articles/

📁.. (Previous Directory)
🗎Love Live! Custom Arcade Controller.article 2022-07-28T19:56:08.204811Z gitpod 6726
+
🗎curabitur vel tempus ex.article 2022-07-28T19:56:08.236811Z gitpod 6935
+
🗎sigplace1.article 2022-07-28T19:56:08.740811Z gitpod 87035
+
📁test articles 2022-07-28T19:56:08.82881Z gitpod 147
+
🗎Love Live! Custom Arcade Controller.article.html 2022-07-28T19:56:08.78481Z gitpod 7443
+
🗎curabitur vel tempus ex.article.html 2022-07-28T19:56:08.80481Z gitpod 7652
+
🗎sigplace1.article.html 2022-07-28T19:56:08.81681Z gitpod 87752
diff --git a/out/articles/Love Live! Custom Arcade Controller.article b/out/articles/Love Live! Custom Arcade Controller.article index d40b066..190d8c8 100644 --- a/out/articles/Love Live! Custom Arcade Controller.article +++ b/out/articles/Love Live! Custom Arcade Controller.article @@ -61,11 +61,11 @@ For over a year since I first got into Love Live! School Idol Festival ~after
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/Love Live! Custom Arcade Controller.article.html b/out/articles/Love Live! Custom Arcade Controller.article.html index 5441f43..4169b24 100644 --- a/out/articles/Love Live! Custom Arcade Controller.article.html +++ b/out/articles/Love Live! Custom Arcade Controller.article.html @@ -80,11 +80,11 @@ For over a year since I first got into Love Live! School Idol Festival ~after
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/curabitur vel tempus ex.article b/out/articles/curabitur vel tempus ex.article index 327665b..ff64524 100644 --- a/out/articles/curabitur vel tempus ex.article +++ b/out/articles/curabitur vel tempus ex.article @@ -65,11 +65,11 @@ Curabitur vel tempus ex. Duis cursus sapien nisl, ut pulvinar dui porttitor ut.
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/curabitur vel tempus ex.article.html b/out/articles/curabitur vel tempus ex.article.html index 7c71a06..cca9d16 100644 --- a/out/articles/curabitur vel tempus ex.article.html +++ b/out/articles/curabitur vel tempus ex.article.html @@ -84,11 +84,11 @@ Curabitur vel tempus ex. Duis cursus sapien nisl, ut pulvinar dui porttitor ut.
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/sigplace1.article b/out/articles/sigplace1.article index 94cbf8c..47e68ae 100644 --- a/out/articles/sigplace1.article +++ b/out/articles/sigplace1.article @@ -540,11 +540,11 @@ Here we demonstrate the love live logo. But wait, it's literally like in the mid
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/sigplace1.article.html b/out/articles/sigplace1.article.html index 25ad137..dca0b51 100644 --- a/out/articles/sigplace1.article.html +++ b/out/articles/sigplace1.article.html @@ -559,11 +559,11 @@ Here we demonstrate the love live logo. But wait, it's literally like in the mid
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/test articles/DIRECTORY_LISTING b/out/articles/test articles/DIRECTORY_LISTING index 457ea17..b812544 100644 --- a/out/articles/test articles/DIRECTORY_LISTING +++ b/out/articles/test articles/DIRECTORY_LISTING @@ -17,12 +17,12 @@
-

Directory Listing for /articles/test articles/

🗎test1.article 2022-07-28T18:33:07.29318Z gitpod 7244
-
🗎test2.article 2022-07-28T18:33:07.29718Z gitpod 6940
-
🗎test3.article 2022-07-28T18:33:07.29718Z gitpod 7153
-
🗎test1.article.html 2022-07-28T18:33:07.34518Z gitpod 7961
-
🗎test2.article.html 2022-07-28T18:33:07.34918Z gitpod 7657
-
🗎test3.article.html 2022-07-28T18:33:07.34918Z gitpod 7870
+

Directory Listing for /articles/test articles/

🗎test1.article 2022-07-28T19:56:08.740811Z gitpod 7254
+
🗎test2.article 2022-07-28T19:56:08.744811Z gitpod 6950
+
🗎test3.article 2022-07-28T19:56:08.748811Z gitpod 7163
+
🗎test1.article.html 2022-07-28T19:56:08.82481Z gitpod 7971
+
🗎test2.article.html 2022-07-28T19:56:08.82481Z gitpod 7667
+
🗎test3.article.html 2022-07-28T19:56:08.82881Z gitpod 7880
diff --git a/out/articles/test articles/test1.article b/out/articles/test articles/test1.article index 302bf9b..34dded5 100644 --- a/out/articles/test articles/test1.article +++ b/out/articles/test articles/test1.article @@ -59,11 +59,11 @@
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/test articles/test1.article.html b/out/articles/test articles/test1.article.html index 600d032..fa0845c 100644 --- a/out/articles/test articles/test1.article.html +++ b/out/articles/test articles/test1.article.html @@ -78,11 +78,11 @@
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/test articles/test2.article b/out/articles/test articles/test2.article index 857cbf6..e23ab11 100644 --- a/out/articles/test articles/test2.article +++ b/out/articles/test articles/test2.article @@ -59,11 +59,11 @@
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/test articles/test2.article.html b/out/articles/test articles/test2.article.html index dce9b05..067ae15 100644 --- a/out/articles/test articles/test2.article.html +++ b/out/articles/test articles/test2.article.html @@ -78,11 +78,11 @@
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/test articles/test3.article b/out/articles/test articles/test3.article index b0fe7eb..257d33e 100644 --- a/out/articles/test articles/test3.article +++ b/out/articles/test articles/test3.article @@ -59,11 +59,11 @@
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/articles/test articles/test3.article.html b/out/articles/test articles/test3.article.html index fbac0a6..320cc10 100644 --- a/out/articles/test articles/test3.article.html +++ b/out/articles/test articles/test3.article.html @@ -78,11 +78,11 @@
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/otherpage.html b/out/otherpage.html index 63b7383..7cfd4aa 100644 --- a/out/otherpage.html +++ b/out/otherpage.html @@ -86,11 +86,11 @@ $ARTICLE_PREVIEW curabitur vel tempus ex
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/reset.css b/out/reset.css index a371de3..49f5fc1 100644 --- a/out/reset.css +++ b/out/reset.css @@ -101,11 +101,11 @@ table {
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/sig.css b/out/sig.css index 56c1dac..40564aa 100644 --- a/out/sig.css +++ b/out/sig.css @@ -438,11 +438,11 @@ textarea:disabled{
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/testfile.html b/out/testfile.html index 7b9a355..8a1d0e9 100644 --- a/out/testfile.html +++ b/out/testfile.html @@ -85,11 +85,11 @@ SigPlace
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/out/uploadform.html b/out/uploadform.html index 4f582c5..d41d398 100644 --- a/out/uploadform.html +++ b/out/uploadform.html @@ -85,11 +85,11 @@ SigPlace
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/ref/COMMENT.html b/ref/COMMENT.html index 7cd0185..cfb202d 100644 --- a/ref/COMMENT.html +++ b/ref/COMMENT.html @@ -54,11 +54,11 @@
-  B  -  I  -  U  -  <code>  -  <http://>  +  B  +  I  +  U  +  <code>  +  <http://>   😊   😔   👍  diff --git a/sigServer.java b/sigServer.java index 68365ac..4c1adee 100644 --- a/sigServer.java +++ b/sigServer.java @@ -27,6 +27,20 @@ import java.util.regex.Pattern; public class sigServer { ServerSocket socket; + + /** + * Writes a span tag with the included class. + * **/ + private static String SPAN(String className) { + return ""; + } + private static boolean validNumericalConstantCharacters(String storedCodeBlock,int lengthOfConstant, int j) { + return storedCodeBlock.charAt(j)>='0'&&storedCodeBlock.charAt(j)<='9'||lengthOfConstant>0&&storedCodeBlock.charAt(j)=='.'||lengthOfConstant>0&&storedCodeBlock.charAt(j)>='A'&&lengthOfConstant>0&&storedCodeBlock.charAt(j)<='F'||lengthOfConstant>0&&storedCodeBlock.charAt(j)>='a'&&lengthOfConstant>0&&storedCodeBlock.charAt(j)<='f'||lengthOfConstant>0&&storedCodeBlock.charAt(j)=='x'||lengthOfConstant>0&&storedCodeBlock.charAt(j)=='X'; + } + private static boolean isAlphanumeric(String storedCodeBlock,int j) { + return storedCodeBlock.charAt(j)>='0'&&storedCodeBlock.charAt(j)<='9'||storedCodeBlock.charAt(j)>='A'&&storedCodeBlock.charAt(j)<='Z'||storedCodeBlock.charAt(j)>='a'&&storedCodeBlock.charAt(j)<='z'; + } + sigServer() { try { socket = new ServerSocket(sigPlace.PORT); @@ -145,15 +159,211 @@ public class sigServer { if (location.equals("COMMENTS")&&requestParams.containsKey("message")&&requestParams.containsKey("name")&&requestParams.containsKey("color")) { //System.out.println(requestParams); String finalMsg = requestParams.get("message").replaceAll(Pattern.quote("%0A"),"
").replaceAll(Pattern.quote("%3C"),"<"); + boolean boldBlock=false; + boolean italicBlock=false; + boolean underlineBlock=false; + boolean codeBlock=false; + boolean linkBlock=false; + StringBuilder storedLink=new StringBuilder(); + StringBuilder codeBlockMsg = new StringBuilder(); + StringBuilder buildMsg = new StringBuilder(); + for (int i=0;i"; + startPos=j+1; + } + if (!inComment&&!inMultiLineComment&&(j>0&&storedCodeBlock.charAt(j-1)!='\\'&&(!inString&&(storedCodeBlock.charAt(j)=='"'||storedCodeBlock.charAt(j)=='\'')||inString&&(storedCodeBlock.charAt(j)==stringChar)))) { + inString=!inString; + if (inString) { + stringChar=storedCodeBlock.charAt(j); + s+=SPAN("string")+stringChar; + } else { + s+=stringChar; + s+="
"; + startPos=j+1; + } + } else + if (!inString) { + if (canBeNumericalConstant&&validNumericalConstantCharacters(storedCodeBlock,lengthOfConstant, j)) { + lengthOfConstant++; + //System.out.println("Length of Constant now "+lengthOfConstant); + } + if (j>0&&storedCodeBlock.charAt(j)=='/'&&storedCodeBlock.charAt(j+1)=='*'||inMultiLineComment) { + if (!inMultiLineComment) { + inMultiLineComment=true; + } else { + if (storedCodeBlock.charAt(j-1)=='*'&&storedCodeBlock.charAt(j)=='/') { + inMultiLineComment=false; + s+=SPAN("comment")+storedCodeBlock.substring(startPos,j)+storedCodeBlock.charAt(j)+""; + startPos=j+1; + } + } + //Stops further execution since we're in a comment. + } else + if (j>0&&storedCodeBlock.charAt(j)=='/'&&storedCodeBlock.charAt(j+1)=='/'||inComment) { + if (!inComment) { + inComment=true; + } + //Stops further execution since we're in a comment. + } else + if (canBeNumericalConstant&&lengthOfConstant>0&&!(validNumericalConstantCharacters(storedCodeBlock,lengthOfConstant, j))) { + s+=SPAN("number")+storedCodeBlock.substring(startPos,j)+""+storedCodeBlock.charAt(j); + //System.out.println("Setting "+storedCodeBlock.substring(startPos,j)+storedCodeBlock.charAt(j)); + lengthOfConstant=0; + canBeNumericalConstant=false; + startPos=j+1; + } else + if (!canBeNumericalConstant&&storedCodeBlock.charAt(j)=='.') { + //Previous section was a member. + s+=SPAN("class")+storedCodeBlock.substring(startPos,j)+""+storedCodeBlock.charAt(j); + startPos=j+1; + } else + if (j>3&&storedCodeBlock.substring(j-3,j+1).equals("true")&&!isAlphanumeric(storedCodeBlock,j-4)&&!isAlphanumeric(storedCodeBlock,j+1)) { + s+=SPAN("number")+storedCodeBlock.substring(startPos,j)+storedCodeBlock.charAt(j)+""; + startPos=j+1; + } else + if (j>4&&storedCodeBlock.substring(j-4,j+1).equals("false")&&!isAlphanumeric(storedCodeBlock,j-5)&&!isAlphanumeric(storedCodeBlock,j+1)) { + s+=SPAN("number")+storedCodeBlock.substring(startPos,j)+storedCodeBlock.charAt(j)+""; + startPos=j+1; + } else + if (storedCodeBlock.charAt(j)=='(') { + s+=SPAN("function")+storedCodeBlock.substring(startPos,j)+""+storedCodeBlock.charAt(j); + startPos=j+1; + } else + if (j>0&&isAlphanumeric(storedCodeBlock,j-1) && storedCodeBlock.charAt(j)==' '&&storedCodeBlock.charAt(j-1)!=' ') { + //Previous section was a keyword. + keyword=true; + s+=SPAN("keyword")+storedCodeBlock.substring(startPos,j)+""+storedCodeBlock.charAt(j); + startPos=j+1; + } else + if (j>0&&isAlphanumeric(storedCodeBlock,j-1) && (storedCodeBlock.charAt(j)==';'||storedCodeBlock.charAt(j)==':')) { + //Previous section was a keyword. + //keyword=true; + s+=SPAN("keyword")+storedCodeBlock.substring(startPos,j)+""+storedCodeBlock.charAt(j); + startPos=j+1; + } else + if (keyword&&!(storedCodeBlock.charAt(j)=='_'||storedCodeBlock.charAt(j)>='0'&&storedCodeBlock.charAt(j)<='9'||storedCodeBlock.charAt(j)>='A'&&storedCodeBlock.charAt(j)<='Z'||storedCodeBlock.charAt(j)>='a'&&storedCodeBlock.charAt(j)<='z'||storedCodeBlock.charAt(j)==' ')) { + keyword=false; + s+=SPAN("variable")+storedCodeBlock.substring(startPos,j)+""+storedCodeBlock.charAt(j); + startPos=j+1; + } else + if (!isAlphanumeric(storedCodeBlock,j)){ + if (startPos='0'&&storedCodeBlock.charAt(j)<='9')) { + canBeNumericalConstant=false; + } + if (!canBeNumericalConstant&&!isAlphanumeric(storedCodeBlock,j)) { + canBeNumericalConstant=true; + lengthOfConstant=0; + //System.out.println("Found "+storedCodeBlock.charAt(j)+", can be numeric..."); + } + } + for (int j=0;j"); + } else { + buildMsg.append(""); + } + boldBlock=!boldBlock; + i+=5; + continue; + } + if (i"); + } else { + buildMsg.append(""); + } + italicBlock=!italicBlock; + i+=1; + continue; + } + if (i"); + } else { + buildMsg.append(""); + } + underlineBlock=!underlineBlock; + i+=1; + continue; + } + if (foundSub("%5B%5B",finalMsg,i)||foundSub("%5D%5D",finalMsg,i)) { + if (linkBlock) { + buildMsg.append("\">").append(storedLink).append(""); + } else { + storedLink.delete(0,storedLink.length()); + buildMsg.append(" data = Files.readAllLines(Paths.get(sigPlace.COMMENTSDIR,requestParams.get("article"))); data.set(0,Integer.toString(Integer.parseInt(data.get(0))+1)); - data.add(finalMsg+"\n"+requestParams.get("name")+ZonedDateTime.now()+";"+requestParams.get("color")); + data.add(buildMsg.toString()+"\n"+requestParams.get("name")+ZonedDateTime.now()+";"+requestParams.get("color")); Files.write(Paths.get(sigPlace.COMMENTSDIR,requestParams.get("article")), data, StandardOpenOption.TRUNCATE_EXISTING,StandardOpenOption.WRITE); } else { List data = new ArrayList(); data.add("1"); - data.add(finalMsg+"\n"+requestParams.get("name")+ZonedDateTime.now()+";"+requestParams.get("color")); + data.add(buildMsg.toString()+"\n"+requestParams.get("name")+ZonedDateTime.now()+";"+requestParams.get("color")); Files.write(Paths.get(sigPlace.COMMENTSDIR,requestParams.get("article")), data, StandardOpenOption.TRUNCATE_EXISTING,StandardOpenOption.WRITE,StandardOpenOption.CREATE_NEW); } CreateRequest(client,"200","OK",Paths.get(sigPlace.OUTDIR,"testfile.html")); @@ -192,6 +402,17 @@ public class sigServer { } } + private boolean foundSub(String string, String finalMsg, int i) { + if (i+string.length()<=finalMsg.length()) { + for (int j=0;j