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

URL escape characters from package DESCRIPTION are not escaped for .Rd #1415

Closed
HenningLorenzen-ext-bayer opened this issue Aug 9, 2022 · 2 comments · Fixed by #1416
Closed
Labels
bug an unexpected problem or unintended behavior rd ✍️
Milestone

Comments

@HenningLorenzen-ext-bayer
Copy link
Contributor

HenningLorenzen-ext-bayer commented Aug 9, 2022

Steps to reproduce

  • Example DESCRIPTION file
Package: foobar.test.roxygen2
Type: Package
Title: What the Package Does (Title Case)
Version: 0.1.0
Author: Who wrote it
Maintainer: The package maintainer <yourself@somewhere.net>
Description: More about what it does (maybe more than one line)
    Use four spaces when indenting paragraphs within the Description.
License: What license is it under?
Encoding: UTF-8
LazyData: true
URL: https://www.google.com/search?q=foo%20bar
BugReports: https://www.google.com/search?q=bug%20reports
RoxygenNote: 7.2.0
  • usethis::use_package_doc()

  • Run devtools::check_man()

Result

ℹ Updating foobar.test.roxygen2 documentation
ℹ Loading foobar.test.roxygen2
ℹ Checking documentation...
prepare_Rd: [left out for privacy]/foobar.test.roxygen2/man/foobar.test.roxygen2-package.Rd:19: unexpected section header '\keyword'
prepare_Rd: [left out for privacy]/foobar.test.roxygen2/man/foobar.test.roxygen2-package.Rd:20: unexpected END_OF_INPUT '
'
✔ No issues detected

Contents of .Rd file

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/foobar.test.roxygen2-package.R
\docType{package}
\name{foobar.test.roxygen2-package}
\alias{foobar.test.roxygen2}
\alias{foobar.test.roxygen2-package}
\title{foobar.test.roxygen2: What the Package Does (Title Case)}
\description{
More about what it does (maybe more than one line) Use four spaces when indenting paragraphs within the Description.
}
\seealso{
Useful links:
\itemize{
  \item \url{https://www.google.com/search?q=foo%20bar}
  \item Report bugs at \url{https://www.google.com/search?q=bug%20reports}
}

}
\keyword{internal}

Reference

https://cran.r-project.org/doc/manuals/R-exts.html#Specifying-URLs

Spaces in URLs are not portable and how they are handled does vary by HTTP server and by client. There should be no space in the host part of an ‘http://’ URL, and spaces in the remainder should be encoded, with each space replaced by ‘%20’.

HenningLorenzen-ext-bayer added a commit to HenningLorenzen-ext-bayer/roxygen2 that referenced this issue Aug 10, 2022
HenningLorenzen-ext-bayer added a commit to HenningLorenzen-ext-bayer/roxygen2 that referenced this issue Aug 11, 2022
@hadley hadley added bug an unexpected problem or unintended behavior rd ✍️ labels Nov 2, 2023
@hadley hadley added this to the v7.2.4 milestone Nov 2, 2023
HenningLorenzen-ext-bayer added a commit to HenningLorenzen-ext-bayer/roxygen2 that referenced this issue Nov 2, 2023
HenningLorenzen-ext-bayer added a commit to HenningLorenzen-ext-bayer/roxygen2 that referenced this issue Nov 2, 2023
@hadley
Copy link
Member

hadley commented Nov 15, 2023

@HenningLorenzen-ext-bayer did you want to do a PR?

@HenningLorenzen-ext-bayer
Copy link
Contributor Author

@HenningLorenzen-ext-bayer did you want to do a PR?

I have started a PR (#1416) but closed it back then since I was unsure about the legal implications of contributing.
But now I am ready to share my code and have reopened the PR.

hadley pushed a commit that referenced this issue Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior rd ✍️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants