# Simplify handling special characters in Quick Actions

**URL:** https://community.mp3tag.de/t/simplify-handling-special-characters-in-quick-actions/52052
**Category:** General Discussion
**Created:** [February 19, 2021, 9:07pm UTC](https://community.mp3tag.de/t/simplify-handling-special-characters-in-quick-actions/52052 "2021-02-19T21:07:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![14geronimo](https://community.mp3tag.de/user_avatar/community.mp3tag.de/14geronimo/32/5132_2.png) [@14geronimo](https://community.mp3tag.de/u/14geronimo)
#### Post date: [February 19, 2021, 9:07pm UTC](https://community.mp3tag.de/t/simplify-handling-special-characters-in-quick-actions/52052/1 "2021-02-19T21:07:55Z")

</div>

I always struggle with special characters when using Quick Actions. I know the theory (e.g. Polar Sequences '['with Biosphere']' ), but it takes me a while to get there. Every single time.

So, I would suggest to either:

1. Get rid of special characters handling in the Quick Actions box. Unless they're needed in some scenarios, but to be honest I've never encountered these. Happy to be contradicted. When would you need special handling of `[` or `'` in this input field?
2. Use the more ubiquitous backslash escaping sequence, i.e. `[` would be escaped using `\[` like in most other softwares.

Again, happy to be explained why the single-quoting escaping sequence is absolutely needed here. If I understand I might stand a better chance remember it!

![20210219-205929](https://community.mp3tag.de/uploads/default/original/2X/5/5ed6898923d5cf4b0b0151afe86f198035dc6cf5.png)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [February 20, 2021, 11:20am UTC](https://community.mp3tag.de/t/simplify-handling-special-characters-in-quick-actions/52052/2 "2021-02-20T11:20:25Z")

</div>

> [@14geronimo](#):
>
> Get rid of special characters handling in the Quick Actions box. Unless they're needed in some scenarios, but to be honest I've never encountered these.

The square brackets are some kind of "if" condition where the enclosed contents is only written if at least one referenced field is present. Very useful as it saves you from writing lengthy $if() statements.  
An example would be the formatting of a filename where you want to add the extra CD folder only if there is a discnumber: `%album%\[CD %discnumber%\]%title%`  
Which would also show that right there your would have to escape the backslash to be included if the backslash were the escaping character.  
The special purpose of the square brackets only appears in format strings. So it is by far not all "Actions (Quick)" but only those that allow a format string.

---

<div class="post-metadata">

### Author: ![14geronimo](https://community.mp3tag.de/user_avatar/community.mp3tag.de/14geronimo/32/5132_2.png) [@14geronimo](https://community.mp3tag.de/u/14geronimo)
#### Post date: [February 20, 2021, 6:53pm UTC](https://community.mp3tag.de/t/simplify-handling-special-characters-in-quick-actions/52052/3 "2021-02-20T18:53:39Z")

</div>

> [@ohrenkino](#):
>
> The square brackets are some kind of "if" condition where the enclosed contents is only written if at least one referenced field is present. Very useful as it saves you from writing lengthy $if() statements.  
> An example would be the formatting of a filename where you want to add the extra CD folder only if there is a discnumber: `%album%\[CD %discnumber%\]%title%`

Understood, thank you for explaining this. I see how it can indeed be quite useful. In your example above I got thrown off by the backslash characters, although I now understand the point you were trying to make. So for folks out there, another example might be a Quick Action to Format Value a field (say COMMENT for testing) with `Fred. [%track%.]%title%`

Perhaps the only request to take away from this might be to improve the doc. I see a reference to square brackets under section "Characters with special functionality" in the Help page [help.mp3tag.de/main\_scripting.html](https://docs.mp3tag.de/scripting), but it's easy to skip over it. This section could do with a few example to explain the use of each special character to illustrate their use.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [March 22, 2021, 6:54pm UTC](https://community.mp3tag.de/t/simplify-handling-special-characters-in-quick-actions/52052/4 "2021-03-22T18:54:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
