Hot to sanitize title in {localize.eng.t}

All about user-defined episode / movie / file name format expressions
Post Reply
antisgae
Posts: 13
Joined: 29 Aug 2018, 22:48

Hot to sanitize title in {localize.eng.t}

Post by antisgae »

When you use {t} it sanitize it so no probs renaming but if i use {localize.eng.t} it does not and i'm having problems with / that creates directories.

How can I remove the / or better make {localize.eng.t} sanitize like {t}

Bests
antisgae
Posts: 13
Joined: 29 Aug 2018, 22:48

Re: Hot to sanitize title in {localize.eng.t}

Post by antisgae »

Self answer i used this {localize.eng.t.tr('/','-')}
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Hot to sanitize title in {localize.eng.t}

Post by rednoah »

Unfortunately, the format engine can only sanitize top-level bindings implicitly. If you do more complex things in your code then you need to sanitize things yourself as desired.

e.g.

Code: Select all

{localize.eng.t.slash(' ')}
:idea: Please read the FAQ and How to Request Help.
Post Reply