Applied petschki's patch which fixes javascript error on enabled
  'mark special links' option, fixes #12440