Could you be more specific? As far as I know, the Confluence Code Block macro supports ampersands in the code. Is there something specific you're trying to do or some specific problem you're running into?
I discovered that the ampersand (&) is replaced with the corresponding HTML entity (&) whenever it is followed by a dollar sign ($).
Other ampersands are rendered correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found that the problem does not happen when the default syntax highlighting is enabled, but only when we use a custom one. I gather the problem lies therein. I’ll see if I can fix it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just stumbled across this as well.
Using a "code block" macro,
foo & bar
will be shown as-is, but
http://host/foo&bar
will turn into
http://host/foo&bar
I suspect that's bug, probably some filter trying to escape URLs for <a> tags?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.