Skip to content

Commit

Permalink
fix : valid_robotstxt() would be to restrictive in case of BOM with a…
Browse files Browse the repository at this point in the history
… non-comment in line 1
  • Loading branch information
petermeissner committed Oct 20, 2017
1 parent c54c540 commit 4e756fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/valid_robotstxt.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ is_valid_robotstxt <- function(text){
useBytes = TRUE
) |
# - spaces followed by letter(s) followed by a double dot (somewhere)
grepl("^(\xef\xbb\xbf)*(\\s*\\w.*:)", text) |
grepl("^(\xef\xbb\xbf)*(\\s*\\w.*:)", text, useBytes = TRUE) |
# - spaces only or empty line
grepl("^(\xef\xbb\xbf)*(\\s)*$", text)
grepl("^(\xef\xbb\xbf)*(\\s)*$", text, useBytes = TRUE)
)
}

Expand Down

0 comments on commit 4e756fc

Please sign in to comment.