Arrow characters are now correctly escaped in raw mode
bit / docker (push) Failing after 29s Details

This commit is contained in:
Marco Cetica 2024-04-05 10:54:48 +02:00
parent 8666383048
commit 6e1b8f878d
Signed by: marco
GPG Key ID: 45060A949E90D0FD
2 changed files with 7 additions and 3 deletions

View File

@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.3</version>
<version>3.2.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.ceticamarco</groupId>
@ -14,7 +14,7 @@
<name>bit</name>
<description>Simple Web-based text sharing platform</description>
<properties>
<java.version>21</java.version>
<java.version>22</java.version>
</properties>
<dependencies>
<dependency>

View File

@ -73,7 +73,11 @@ public class PostController {
throw new GenericErrorException(res.getLeft().getMessage(), "error");
}
var content = "<pre>" + res.get().getContent() + "</pre>";
var content = res.get().getContent();
content = content.replaceAll("<", "&lt;");
content = content.replaceAll(">", "&gt;");
content = "<pre>" + content + "</pre>";
return new ResponseEntity<>(content, HttpStatus.OK);
}