From ebd2d9ff6170cab3dbc14e0d4e7d96b4046dcbf8 Mon Sep 17 00:00:00 2001 From: Hannes Papenberg Date: Tue, 2 Apr 2024 21:19:36 +0200 Subject: [PATCH 1/2] Form Text Field: Translate text for frontend validation --- layouts/joomla/form/field/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/joomla/form/field/text.php b/layouts/joomla/form/field/text.php index cba5f453b9e6f..3a5c503e76d56 100644 --- a/layouts/joomla/form/field/text.php +++ b/layouts/joomla/form/field/text.php @@ -95,7 +95,7 @@ !empty($pattern) ? 'pattern="' . $pattern . '"' : '', // @TODO add a proper string here!!! - !empty($validationtext) ? 'data-validation-text="' . $validationtext . '"' : '', + !empty($validationtext) ? 'data-validation-text="' . Text::_($validationtext) . '"' : '', ]; $addonBeforeHtml = '' . Text::_($addonBefore) . ''; From 8baa9319d20e0eb37406a8bbe8fe014b4f29363c Mon Sep 17 00:00:00 2001 From: Hannes Papenberg Date: Mon, 22 Jul 2024 12:25:15 +0200 Subject: [PATCH 2/2] Update text.php --- layouts/joomla/form/field/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/joomla/form/field/text.php b/layouts/joomla/form/field/text.php index 3a5c503e76d56..4dcaf2c4fce1f 100644 --- a/layouts/joomla/form/field/text.php +++ b/layouts/joomla/form/field/text.php @@ -95,7 +95,7 @@ !empty($pattern) ? 'pattern="' . $pattern . '"' : '', // @TODO add a proper string here!!! - !empty($validationtext) ? 'data-validation-text="' . Text::_($validationtext) . '"' : '', + !empty($validationtext) ? 'data-validation-text="' . $this->escape(Text::_($validationtext)) . '"' : '', ]; $addonBeforeHtml = '' . Text::_($addonBefore) . '';