Invalid characters in variable names?
-
In my tests, variable names cannot contain a dash (hyphen). When a variable has a name with a dash, the variable name (with braces) is printed (instead of its content).
For example, let’s say I have a snippet called hello:
<strong>Hello, {variable-name}!</strong>
When I try to use it like this:
[hello variable-name="John"]
The output is this:
Hello, {variable-name}!
I don’t exactly need hyphens in my variable names, though. Maybe the variable field could simply turn red (like in the shortcodes with spaces issue) when an invalid character is used (I didn’t tested other possibly problematic characters).
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Invalid characters in variable names?’ is closed to new replies.