diff --git a/DESCRIPTION b/DESCRIPTION index 0e91613..cf30eb1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,7 @@ Package: htmltidy Title: Tidy Up and Test XPath Queries on HTML and XML Content -Version: 0.3.0 +Version: 0.3.1 +Encoding: UTF-8 Authors@R: c( person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre")), person("Dave", "Raggett", email = "dsr@w3.org", role = c("ctb", "aut"), @@ -53,4 +54,4 @@ Imports: XML, htmlwidgets, htmltools -RoxygenNote: 5.0.1 +RoxygenNote: 6.0.0 diff --git a/NEWS.md b/NEWS.md index 2f52b59..aaa9cbb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# htmltidy 0.3.1 + +* Fix warnings coming from URL redirection in examples + # htmltidy 0.3.0 * Better error handling (fixed crashing bug in #1) diff --git a/R/RcppExports.R b/R/RcppExports.R index 3393706..9484152 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -1,4 +1,4 @@ -# This file was generated by Rcpp::compileAttributes +# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 tidy_html_int <- function(source, options, show_errors) { diff --git a/R/tidy.r b/R/tidy.r index 3739d5b..9f31d92 100644 --- a/R/tidy.r +++ b/R/tidy.r @@ -71,7 +71,7 @@ #' cat(tidy_html(txt, option=opts)) #' #' library(httr) -#' res <- GET("http://rud.is/test/untidy.html") +#' res <- GET("https://rud.is/test/untidy.html") #' #' # look at the original, un-tidy source #' cat(content(res, as="text", encoding="UTF-8")) @@ -81,7 +81,7 @@ #' list(TidyDocType="html5", TidyWrapLen=200))) #' #' # but, you could also just do: -#' cat(tidy_html(url("http://rud.is/test/untidy.html"))) +#' cat(tidy_html(url("https://rud.is/test/untidy.html"))) tidy_html <- function(content, options=list(TidyXhtmlOut=TRUE), verbose=FALSE) { UseMethod("tidy_html") } diff --git a/README.Rmd b/README.Rmd index 9a2ea8c..733ef2d 100644 --- a/README.Rmd +++ b/README.Rmd @@ -64,7 +64,7 @@ library(purrr) This is really "un-tidy" content: ```{r message=FALSE, warning=FALSE} -res <- GET("http://rud.is/test/untidy.html") +res <- GET("https://rud.is/test/untidy.html") cat(content(res, as="text")) ``` @@ -85,14 +85,14 @@ cat(tidy_html(content(res, as="text"), list(TidyDocType="html5", TidyWrapLen=200 NOTE: you could also just have done: ```{r message=FALSE, warning=FALSE} -cat(tidy_html(url("http://rud.is/test/untidy.html"), +cat(tidy_html(url("https://rud.is/test/untidy.html"), list(TidyDocType="html5", TidyWrapLen=200))) ``` You'll see that this differs substantially from the mangling `libxml2` does (via `read_html()`): ```{r message=FALSE, warning=FALSE} -pg <- read_html("http://rud.is/test/untidy.html") +pg <- read_html("https://rud.is/test/untidy.html") cat(toString(pg)) ``` @@ -105,13 +105,13 @@ tidy_html(content(res, as="text", encoding="UTF-8")) tidy_html(content(res, as="parsed", encoding="UTF-8")) -tidy_html(htmlParse("http://rud.is/test/untidy.html")) +tidy_html(htmlParse("https://rud.is/test/untidy.html")) ``` And, show the markup errors: ```{r message=FALSE, warning=FALSE} -invisible(tidy_html(url("http://rud.is/test/untidy.html"), verbose=TRUE)) +invisible(tidy_html(url("https://rud.is/test/untidy.html"), verbose=TRUE)) ``` ### Testing Options diff --git a/README.md b/README.md index 311e1e2..43e912f 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ library(htmltidy) # current verison packageVersion("htmltidy") -## [1] '0.3.0' +## [1] '0.3.1' library(XML) library(xml2) @@ -42,7 +42,7 @@ library(purrr) This is really "un-tidy" content: ``` r -res <- GET("http://rud.is/test/untidy.html") +res <- GET("https://rud.is/test/untidy.html") cat(content(res, as="text")) ##
## ##