Skip to content

Commit

Permalink
disallow unrecognized escapes in unescape_string
Browse files Browse the repository at this point in the history
  • Loading branch information
digital-carver committed May 23, 2018
1 parent a209a45 commit b4f7946
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/strings/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ function unescape_string(io, s::AbstractString)
c == 'v' ? '\v' :
c == 'f' ? '\f' :
c == 'r' ? '\r' :
c == 'e' ? '\e' : c)
c == 'e' ? '\e' :
throw(ArgumentError("invalid escape sequence \\$c")))
end
else
print(io, c)
Expand Down

0 comments on commit b4f7946

Please sign in to comment.