From 48f8902bc744a94db9531cc4efcddb8e2d2b3f45 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Wed, 17 Mar 2021 23:36:34 +0100 Subject: [PATCH] Fix for NPE --- src/main/java/w2phtml/xhtml/content/TextParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/w2phtml/xhtml/content/TextParser.java b/src/main/java/w2phtml/xhtml/content/TextParser.java index 07d1cac..d18236d 100644 --- a/src/main/java/w2phtml/xhtml/content/TextParser.java +++ b/src/main/java/w2phtml/xhtml/content/TextParser.java @@ -1164,7 +1164,7 @@ public class TextParser extends Parser { getTextSP().readStyle(sStyleName,info); getTextSP().readParentStyle(sStyleName,info); Element newNode = node; - if (info.hasAttributes() || !"span".equals(info.sTagName)) { + if (info.hasAttributes() || info.sTagName != null && !"span".equals(info.sTagName)) { // We (probably) need to create a new element newNode = converter.createElement(info.sTagName); writeStyle(info,newNode);