Safe title attribute of draft (for scripting)

The template engine is available in script and can handle things like this nicely and is guaranteed to be consistent with results of templates in other steps, like:

let safeTitle = draft.processTemplate(“[[safe_title]]”);
// or ...
let fileName = draft.processTemplate(“Project-[[safe_title]].markdown”);

Not necessarily arguing against additional properties, just pointing out they may not be necessary and using templates can often save string concatenation steps in script as well.

1 Like