public function doDynamicTranslations(Request $request, Response $response): Response
{
$post = $request->getParsedBody();
- $post['text_orig'] = htmlspecialchars($post['text_orig'], ENT_QUOTES);
if (isset($post['redirect_uri'])) {
$redirect_url = $post['redirect_uri'];
unset($post['redirect_uri']);
if (isset($post['trans']) && isset($post['text_orig'])) {
if (isset($post['new']) && $post['new'] == 'true') {
- //create translation if it does not exists yet
+ //create translation if it does not exist yet
$res = $this->l10n->addDynamicTranslation(
$post['text_orig']
);
/**
* Add default values in database
*
- * @param boolean $check_first Check first if it seem initialized, defaults to true
+ * @param boolean $check_first Check first if it seems initialized, defaults to true
*
* @return boolean
*/
</div>
{% endif %}
<div class="ui top attached accordion-styled header">
- {{ _T("Translation of '%s' label")|replace({'%s': text_orig|escape}) }}
+ {{ _T("Translation of '%s' label")|replace({'%s': text_orig}) }}
</div>
<div class="ui bottom attached accordion-styled segment">
<div class="active content field">
<td class="three wide"><label for="text_trans_{{ text.key }}">{{ text.name }}</label></td>
<td class="thirteen wide">
<input type="text" name="text_trans_{{ text.key }}" id="text_trans_{{ text.key }}" value="{% if text.text %}{{ text.text|escape }}{% endif %}"/>
- <input type=hidden name="text_orig" value="{{ text_orig|escape }}"/>
</td>
</tr>
{% endfor %}
</table>
+ <input type=hidden name="text_orig" value="{{ text_orig|escape }}"/>
</div>
</div>
{% if mode != 'ajax' %}