encode and escape special characters

fixed issue when plugin name, plugin instance, type name, type instance contains characters such as < > etc.