🐛 (locale): Corrige escapado de L10n::using()
`L10n::using()` insertaba el texto de `L10n::n()` sin escapar, tratándolo igual que una traducción de confianza (`l()`/`t()`); ahora se escapa como cualquier otro valor interpolado con `html!`. Además, `using()` no debe usarse en valores de atributo. Su marcado de confianza para `l()`/`t()` podría romper el delimitador si la traducción contuviera una comilla. Se sustituye por `lookup()`
This commit is contained in:
parent
6bea4a5793
commit
3198b74399
13 changed files with 96 additions and 26 deletions
|
|
@ -15,9 +15,7 @@ const EXTRA_TEXT_BG: &str = "bootsier.badge.text_bg";
|
|||
/// use pagetop::prelude::*;
|
||||
/// use pagetop_bootsier::theme::*;
|
||||
///
|
||||
/// let admin = bs::Badge::new()
|
||||
/// .with_label(L10n::n("Admin"))
|
||||
/// .with_text_bg(ThemeColor::Danger);
|
||||
/// let admin = bs::Badge::labeled(L10n::n("Admin")).with_text_bg(ThemeColor::Danger);
|
||||
/// ```
|
||||
pub trait BadgeBootsier {
|
||||
#[builder_fn]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue