Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy to clipboard outputing escape characters in template content #5495

Open
AlexJerabek opened this issue Oct 25, 2018 · 7 comments
Open

Copy to clipboard outputing escape characters in template content #5495

AlexJerabek opened this issue Oct 25, 2018 · 7 comments
Assignees
Labels
Area: accessibility A11yMAS bug Area: Script Lab Issue related to Script Lab

Comments

@AlexJerabek
Copy link
Collaborator

Bug Report

  • Host: All
  • OS: Windows 10
  • Browser: N/A
  • Environment: Beta

Expected behavior:

Share | Copy to clipboard should give me output able to be pasted into Notepad++ (or whatever editor). New lines in Script Lab should be new lines in the text.

Actual behavior:

The template section (and only the template section) is full of \s. Tabs and newlines are represented by \t and \n and quotes are also escaped.

Steps to Reproduce:

1.Share | Copy to clipboard
2. Copy into Notepad++

Screenshot:

escapecharacters

@nico-bellante
Copy link

This should be fixed in Beta now, please reopen if the issue persists.

@AlexJerabek
Copy link
Collaborator Author

@nico-bellante I'm still having this happen for the HTML section. I can't reopen the issue since I'm not an admin on this repo.

@Zlatkovsky Zlatkovsky reopened this Dec 28, 2018
@Zlatkovsky Zlatkovsky self-assigned this Dec 28, 2018
@Zlatkovsky
Copy link
Member

@AlexJerabek, reopened it for you

@Zlatkovsky
Copy link
Member

@AlexJerabek , I also added you to give to the repo, so you should be able to re-open issues in the future.

@Zlatkovsky
Copy link
Member

@AlexJerabek , just tried it with the same "Basic conditional formatting" snippet that you have in your repro -- and I am not able to repro. I am getting a beautifully multi-line template:

image

Is this happening to you with any snippet or with particular snippets?

FWIW, I still think there is some weird semi-nondeterministic behavior with the YAML parser, we had issues like that perennially in the older Script Lab (OfficeDev/script-lab-2017#268). But if we can figure out the pattern -- and esp. if this is something that can be done deterministically just using the YAML parser library, outside of Script Lab --, perhaps we can find a cure.

@AlexJerabek
Copy link
Collaborator Author

Here's a test snippet I just repoed this with: https://gist.github.com/AlexJerabek/372f1dd5f065d89217415f9fb3c348d1

I imported the snippet using the gist URL, copied to the clipboard, then pasted into a .yaml file opened in VS Code. Here's the screenshot:
newlinechars

@ElizabethSamuel-MSFT
Copy link
Contributor

Transferring this issue to the office-js repo, the new home of Script Lab issues.

@ElizabethSamuel-MSFT ElizabethSamuel-MSFT transferred this issue from OfficeDev/script-lab Mar 14, 2025
@ElizabethSamuel-MSFT ElizabethSamuel-MSFT added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Mar 14, 2025
@lindalu-MSFT lindalu-MSFT added Area: Script Lab Issue related to Script Lab Area: accessibility A11yMAS bug labels Mar 14, 2025
@lindalu-MSFT lindalu-MSFT removed the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: accessibility A11yMAS bug Area: Script Lab Issue related to Script Lab
Projects
None yet
Development

No branches or pull requests

6 participants