Skip to content

extension: Fix formatting of bug reports#2343

Merged
patrickhulce merged 2 commits intomasterfrom
extensionbugreport
May 23, 2017
Merged

extension: Fix formatting of bug reports#2343
patrickhulce merged 2 commits intomasterfrom
extensionbugreport

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
Contributor

@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.

3 participants