Example usage for android.net UrlQuerySanitizer getSpaceLegal

List of usage examples for android.net UrlQuerySanitizer getSpaceLegal

Introduction

In this page you can find the example usage for android.net UrlQuerySanitizer getSpaceLegal.

Prototype

public static final ValueSanitizer getSpaceLegal() 

Source Link

Document

Return a value sanitizer that does not allow any special characters except space (' ').

Usage

From source file:com.karura.framework.utils.UrlUtils.java

public static UrlQuerySanitizer sanitizeQuery(String query, String[] parameters) {
    UrlQuerySanitizer sanitizer = new UrlQuerySanitizer();

    sanitizer.registerParameters(parameters, UrlQuerySanitizer.getSpaceLegal());
    sanitizer.parseUrl(query);//  w w w .j av  a2s  .c om
    return sanitizer;
}