Page MenuHomePhabricator

Incorrect escaping kills Javascript in Swedish localization
Closed, ResolvedPublic

Description

Author: lanceskoglund

Description:
The quote around http kills the javascript when you try to add another template. The function validate_field_type fails.

Change the row below in SF_Messages.php

'sf_bad_url_error' => 'måste ha korrekt URL-format, inkluderande "http"'

to

'sf_bad_url_error' => 'måste ha korrekt URL-format, inkluderande http'


Version: unspecified
Severity: major

Details

Reference
bz18853

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:41 PM
bzimport set Reference to bz18853.

Problem is in escaping, not in the localisation, of course.

Looks like SFFormUtils::validationJavascript() needs to make some calls to Xml::escapeJsString()... Likely other functions generating JS with localized text are similarly broken.

Xml::escapeJsString() calls added in Semantic Forms 1.7.