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

extension: Fix formatting of bug reports #2343

Merged
merged 2 commits into from
May 23, 2017
Merged

Conversation

paulirish
Copy link
Member

Reusing the refactor that's on the devtools side.

This fixes the incorrect triple-tick we currently have (with no newlines inbetween).

It also simplifies this bit.

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lovely. LGTM

const body = '&body=' + encodeURI(qsBody);
const errorTitle = err.message.substring(0, MAX_ISSUE_ERROR_LENGTH);
const title = encodeURI('title=Extension Error: ' + errorTitle);
const body = '&body=' + encodeURI(issueBody.trim());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also needs encodeURIComponent

@paulirish
Copy link
Member Author

Redid it with URLSearchParams. Gets encoding for free.

Bonus: If any of these characters ("&", "+", and "=") were in error message or stack, they would have broken the issue body (though the report would partially make it). This is fixed now.

@patrickhulce patrickhulce merged commit d706429 into master May 23, 2017
@patrickhulce patrickhulce deleted the extensionbugreport branch May 23, 2017 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants