Permalink
Browse files

Remove fragment at lowercaseAndStripQuerystring

Closes #447
  • Loading branch information...
sdelamo committed Sep 20, 2017
1 parent 8f25485 commit 01a63853e13f422406529415c541804a9cb2565a
@@ -188,6 +188,11 @@ abstract class AbstractFilterInvocationDefinition implements FilterInvocationSec
fixed = fixed.substring(0, firstQuestionMarkIndex)
}
int firstHashtagIndex = fixed.indexOf('#')
if (firstHashtagIndex != -1) {
fixed = fixed.substring(0, firstHashtagIndex)
}
fixed
}
@@ -64,6 +64,11 @@ class AnnotationFilterInvocationDefinitionSpec extends AbstractUnitSpec {
'/foo/bar' == fid.lowercaseAndStripQuerystring('/foo/BAR?x=1')
}
void 'lowercaseAndStringQuerystring removes fragement'() {
expect:
'/foo/bar' == fid.lowercaseAndStripQuerystring('/foo/BAR#tableOfContents')
}
void 'getAttributes for null arg'() {
when:
fid.getAttributes null

0 comments on commit 01a6385

Please sign in to comment.