def get_uid_search_xpath(uid):
    # type: (str) -> str
    """Method to get the XPath expression for a UID that might contain quote characters.

    Parameters
    ----------
        uid : str
            Original UID string with XPath expression.

    Returns
    -------
        str
            Processed XPath expression to escape quote characters using "concat()".
    """
    if '"' in uid or '&quot;' in uid:
        uid_concat = "concat('%s')" % uid.replace('&quot;', "\',\'\"\',\'").replace('"',
                                                                                    "\',\'\"\',\'")
        return './/*[@uID=' + uid_concat + ']'
    else:
        return './/*[@uID="' + uid + '"]'