try to set the value with li_element.text(propertyName + ' (' + pid + ')' ) to prevent injection