fix #528 & fix #542

fix #528 & fix #542 
unescape HTML from titles and messages PN
check for malformed PN (null type) to avoid a crash