|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This report was generated with an evaluation server license. Purchase Clover or configure your license. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| UrlFunctions | Line # 10 | 2 | 0% | 2 | 4 | 0% |
0.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| No Tests | |||
| 1 | package net.sourceforge.pebble.web.tagext; | |
| 2 | ||
| 3 | import net.sourceforge.pebble.util.StringUtils; | |
| 4 | import net.sourceforge.pebble.util.UrlRewriter; | |
| 5 | /** | |
| 6 | * Used from jsp taglib url.tld | |
| 7 | * @author Olaf Kock | |
| 8 | * @see UrlRewriter | |
| 9 | */ | |
| 10 | public class UrlFunctions { | |
| 11 | 0 |
public static String rewrite(String url) { |
| 12 | // if you'd like to see the decorated urls highlighted, | |
| 13 | // a html injection is commented. This wouldn't work | |
| 14 | // for all cases, but gives an idea where rewriting an | |
| 15 | // url is done (and has succeeded) | |
| 16 | 0 | return UrlRewriter.doRewrite(url); // + "\" style=\"background-color:blue"; |
| 17 | }; | |
| 18 | ||
| 19 | 0 |
public static String escape(String url) { |
| 20 | 0 | return StringUtils.transformHTML(url); |
| 21 | }; | |
| 22 | } | |
|
||||||||||||