Project

General

Profile

Actions

Feature #69045

closed

Add an escape option for f:uri viewhelper

Added by Marian Pollzien over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2015-08-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Currently the urls generated with the f:uri viewhelpers are not escaped with htmlspecialchars like it is done in the f:link viewhelpers.
There should be an option to enable/disable the escaping, otherwise the f:uri viewhelper cannot be used to set urls inside of javascript.

Actions #1

Updated by Claus Due over 8 years ago

You should be able to do that with:

{f:uri...() -> f:format.urlencode()}

This passes the entire URI through `rawurlencode` which I think is what you need. It is only marginally slower than adding, parsing and respecting a new argument on all `f:uri.` ViewHelpers and has the added benefit of always behaving the same way when used with any URI-generating ViewHelper.

I recommend closing this one :)

Actions #2

Updated by Claus Due over 8 years ago

  • Status changed from New to Closed

Closed; has easy to use alternative solution and the default behavior does not need to be changed.

Actions

Also available in: Atom PDF