Implemented #surroundWithUrlCommandIfNecessary