Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Codeblock Quality Defect - Character encoding issues

Christopher Zack December 31, 2019

When creating a codeblock element and select "plain text," any special characters are encoded if they are wrapped in quotation marks. Most notably, the ampersand symbol (&) will be outputted as & even though "Plain Text" was selected.

1 answer

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 2, 2020

Hello there, @Christopher Zack !

As I understand, special characters are escaped inside the Codeblock Macro even though you selected Plain Text as format.

With this behavior in mind, I tried to replicate the issue locally. I was ultimately unable to. Here is a screen capture of my attempt:

CodeBlockSpecialCharacters.gif

 

Since I was unable to replicate, I would like to take a deeper look into this behavior with you. Here are a few questions:

  1. Is this happening regardless of browser being used?
  2. Is this issue affecting all Codeblock macros you placed?
  3. Are you typing in the special characters or are you pasting them from somewhere else?

 

Looking forward to your reply, Christopher!

Christopher Zack January 2, 2020

Hi Diego, here is an example to replicate this issue from. Doesn't seem to exclusively be ampersands inside quotation marks as something else is in play here but on publish (and preview), the ampersand becomes encoded:

<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');

fbq('init', '123456789');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=691433037612974&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
  1. I was able to replicate this issue in Chrome and Firefox.
  2. Plain Text, PHP, HTML/XML and a few others also encountered this issue.
  3. Copying and Pasting code from Notepad to strip formatting.

Here is an additional screenshot of the issue: https://www.screencast.com/t/00S1uNlpYx

Hope this is helpful!

Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 2, 2020

Hey @Christopher Zack , thanks for the quick feedback on the issue!

Interesting to see your results. Here is what I see in both Firefox and Chrome:

CodeBlockSecondTest-min.gif

 

Here is my environment:

Anotação 2020-01-02 131950.jpg

Anotação 2020-01-02 131945.jpg

Anotação 2020-01-02 131938.jpg

 

Could you give more details on the Browser version and operating system? We need to better understand and try to replicate it.

If we are able to replicate the behavior, we can file a report to try and tackle the issue!

Let us hear from you.

Christopher Zack January 2, 2020

Google Chrome:
Version 79.0.3945.88 (64-bit)

Firefox:
71.0 (64-bit)

Christopher Zack January 2, 2020

Windows specifications

Edition: Windows 10 Enterprise

Version: 1809

OS build: 17763.379

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events