issue #997

Text in javascript location function was not escaped