fixed a bug that raise an error when the uri part of a [[]] tag unintentionally includes another tag at the end