Fixed nullpointer error (htmlEncode changed for null texts)