1
0

A strange escaping is being performed somewhere inside ctxi18n and i18n.M is a way to avoid it.

This commit is contained in:
Alexander Andreev 2024-09-15 02:55:36 +04:00
parent 802c925450
commit 841653f502
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -22,13 +22,13 @@ templ Guestbook(captchaID, owner string, entries []*justguestbook.Entry, pageCou
<input type="checkbox" name="hide_website" id="hide-website" checked/>
<label for="hide-website">{ i18n.T(ctx, "guestbook.form.hide-website-1") } <small>{ i18n.T(ctx, "guestbook.form.hide-website-2") }</small></label>
<br/>
<small>@templ.Raw(i18n.T(ctx, "guestbook.form.quote-usage"))</small>
<small>@templ.Raw(i18n.T(ctx, "guestbook.form.quote-usage", i18n.M{"sign":">"}))</small>
</span>
<span class="captcha">
<input type="hidden" name="captcha_id" value={ captchaID }/>
<img src={ string(templ.URL(fmt.Sprintf("/api/captcha/%s/image", captchaID))) } alt="CAPTCHA" width="160" height="40"/>
<input type="text" name="captcha_answer" maxlength="6" placeholder="CAPTCHA" required/>
<small>@templ.Raw(i18n.T(ctx, "guestbook.form.captcha-validity"))</small>
<small>@templ.Raw(i18n.T(ctx, "guestbook.form.captcha-validity", i18n.M{"valid":"<b>10</b>"}))</small>
</span>
<input type="submit" value={ i18n.T(ctx, "guestbook.form.send-post") }/>
</form>