mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-02 13:48:15 +02:00
Switch order of literals to prevent NullPointerException
This commit is contained in:
parent
f0b1cb11d0
commit
219790dcae
@ -56,7 +56,7 @@ public class ConvertOfficeController {
|
||||
|
||||
// Check if the file is HTML and apply sanitization if needed
|
||||
String fileExtension = FilenameUtils.getExtension(originalFilename).toLowerCase();
|
||||
if (fileExtension.equals("html") || fileExtension.equals("htm")) {
|
||||
if ("html".equals(fileExtension) || "htm".equals(fileExtension)) {
|
||||
// Read and sanitize HTML content
|
||||
String htmlContent = new String(inputFile.getBytes(), StandardCharsets.UTF_8);
|
||||
String sanitizedHtml = customHtmlSanitizer.sanitize(htmlContent);
|
||||
|
Loading…
Reference in New Issue
Block a user