By default, html-encode translation parameters

Also ensure that any existing parameter is not double-encoded by
removing .Text when used as a translation parameter.
This commit is contained in:
Sebastien Ros
2015-06-16 16:50:45 -07:00
parent cd49d2ccf2
commit 20c5b494cd
13 changed files with 106 additions and 18 deletions

View File

@@ -2,11 +2,11 @@
@{
string name = Model.Name;
string title = null;
IHtmlString title = null;
if (Model.State != null && HasText(Model.State.Unity)) {
string amount = Model.State.Amount;
string unity = Model.State.Unity;
title = T("{0} {1} after", amount, T(unity).Text).Text;
title = T("{0} {1} after", amount, T(unity));
}
}