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

Escape html in comments in author info from DESCRIPTION #1204

Merged
merged 7 commits into from
Mar 11, 2020
Merged

Escape html in comments in author info from DESCRIPTION #1204

merged 7 commits into from
Mar 11, 2020

Conversation

maelle
Copy link
Collaborator

@maelle maelle commented Jan 16, 2020

cc @jeroen

fix #1205

@maelle
Copy link
Collaborator Author

maelle commented Jan 16, 2020

Maybe it should even use linkify()? 🤔

Example

comment <- "Kramer reviewed the package for ropensci,
             see <https://github.com/ropensci/software-review/issues/256>"

pkgdown:::linkify(comment)
#> [1] "Kramer reviewed the package for ropensci,\n             see &lt;<a href='https://github.com/ropensci/software-review/issues/256'>https://github.com/ropensci/software-review/issues/256</a>&gt;"

Created on 2020-01-16 by the reprex package (v0.3.0)

@jeroen
Copy link
Member

jeroen commented Jan 16, 2020

Thanks, looks good!

@@ -26,3 +26,14 @@ test_that("names can be removed from persons", {
expect_length(remove_name(p4$comment, "ORCID"), 0)
expect_length(remove_name(p5$comment, "ORCID"), 0)
})

test_that("Comments in authors info are linkified", {
p <- list(name = "Jane Doe",
Copy link
Member

Choose a reason for hiding this comment

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

Can you please use standard tidyverse styling?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops, now I think it looks like https://style.tidyverse.org/syntax.html#long-lines :-)

@hadley hadley merged commit 5d965e4 into r-lib:master Mar 11, 2020
@hadley
Copy link
Member

hadley commented Mar 11, 2020

Thanks!

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.

html in authors info from DESCRIPTION is not escaped
3 participants