Tab expansion in dynamic button labels

The string \t in the label of a dynamic button will be expanded to a tab. This can happen for instance if the label is path:

button.label = item;

Is this by design?

If so, I'd just escape the label:

button.label = String(item).replace(/\\t/g, '\\\\t');

It depends what notablabel is set to.

You'll definitely need to double & characters, though. My example script does it with a function:

function DoubleAmpersands(str)
{
	return str.replace(/&/g,"&&");
}

I've improved the docs in ButtonData [Directory Opus Manual] to mention ampersands and cross-reference the notablabel property when describing the label property.