Skip to content

Commit

Permalink
fix: escape % in formatted errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mrinalwadhwa committed Nov 9, 2018
1 parent 52e47d6 commit ef6ccdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions did.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (p *parser) parsePath() parserStep {
if (currentIndex+2 >= inputLength) ||
isNotHexDigit(input[currentIndex+1]) ||
isNotHexDigit(input[currentIndex+2]) {
return p.errorf(currentIndex, "% is not followed by 2 hex digits")
return p.errorf(currentIndex, "%% is not followed by 2 hex digits")
}
// if we got here, we're dealing with percent encoded char, jump three chars
percentEncoded = true
Expand Down Expand Up @@ -382,7 +382,7 @@ func (p *parser) parseFragment() parserStep {
if (currentIndex+2 >= inputLength) ||
isNotHexDigit(input[currentIndex+1]) ||
isNotHexDigit(input[currentIndex+2]) {
return p.errorf(currentIndex, "% is not followed by 2 hex digits")
return p.errorf(currentIndex, "%% is not followed by 2 hex digits")
}
// if we got here, we're dealing with percent encoded char, jump three chars
percentEncoded = true
Expand Down

0 comments on commit ef6ccdd

Please sign in to comment.