Skip to content

Fix invalid HTML escape #46326

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

Merged
merged 1 commit into from
Dec 2, 2017
Merged

Fix invalid HTML escape #46326

merged 1 commit into from
Dec 2, 2017

Conversation

GuillaumeGomez
Copy link
Member

name_len,
indent: 0,
})?;
if w.alternate() {
Copy link
Member

Choose a reason for hiding this comment

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

What is this change for? item_function is only used to produce HTML.

Copy link
Member Author

Choose a reason for hiding this comment

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

Because in the slidebar on the left, we call these function and escape the text once again. Guess what happens when you escape a string twice?

Copy link
Member

Choose a reason for hiding this comment

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

This function isn't used for rendering the sidebar. This piece of code is rendering the <pre> block at the top of function pages.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes but does it hurt to have this? Seems logical that the alternate handling is propagated to the children no? But if it's an issue, I'll just remove it.

Copy link
Member

Choose a reason for hiding this comment

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

alternate is never set so this is an issue because it's dead code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I'll just remove the update in here then.

indent,
end_newline,
})
if w.alternate() {
Copy link
Member

Choose a reason for hiding this comment

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

Again, what is this for?

Copy link
Member

Choose a reason for hiding this comment

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

This change still needs to be removed.

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 28, 2017
@GuillaumeGomez
Copy link
Member Author

@ollie27: You were absolutely right, the first change was completely useless. It even allowed me to see that the url encoding was incomplete. Thanks for that too! :)

@QuietMisdreavus
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 1, 2017

📌 Commit 35f5be6 has been approved by QuietMisdreavus

@bors
Copy link
Collaborator

bors commented Dec 2, 2017

⌛ Testing commit 35f5be6 with merge 8bcbf91...

bors added a commit that referenced this pull request Dec 2, 2017
@bors
Copy link
Collaborator

bors commented Dec 2, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: QuietMisdreavus
Pushing 8bcbf91 to master...

@bors bors merged commit 35f5be6 into rust-lang:master Dec 2, 2017
@GuillaumeGomez GuillaumeGomez deleted the sidebar-text branch December 2, 2017 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants