forked from grails/grails-core
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make double-encoding prevention generic for any Codec
- Loading branch information
Showing
10 changed files
with
151 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/Encodeable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.codehaus.groovy.grails.commons; | ||
|
||
public interface Encodeable { | ||
public CharSequence encode(Encoder encoder); | ||
} |
7 changes: 7 additions & 0 deletions
7
grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/Encoder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.codehaus.groovy.grails.commons; | ||
|
||
public interface Encoder { | ||
public String getCodecName(); | ||
public CharSequence encode(Object o); | ||
public void markEncoded(CharSequence string); | ||
} |
9 changes: 9 additions & 0 deletions
9
grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/EncodingState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.codehaus.groovy.grails.commons; | ||
|
||
import java.util.Set; | ||
|
||
public interface EncodingState { | ||
public Set<String> getEncodingTagsFor(CharSequence string); | ||
public boolean isEncodedWith(String encoding, CharSequence string); | ||
public void registerEncodedWith(String encoding, CharSequence escaped); | ||
} |
5 changes: 5 additions & 0 deletions
5
grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/EncodingStateLookup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.codehaus.groovy.grails.commons; | ||
|
||
public interface EncodingStateLookup { | ||
public EncodingState lookup(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters