Skip to content

Commit

Permalink
Sets _format attribute only if it wasn't set previously by the user.
Browse files Browse the repository at this point in the history
Fixes #8787
  • Loading branch information
davefx authored and fabpot committed Aug 22, 2013
1 parent 2872f83 commit fa35597
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -54,6 +54,12 @@ public function render($uri, Request $request, array $options = array())
// below instead)
$attributes = $reference->attributes;
$reference->attributes = array();

// Except "_format" attribute
if (isset($attributes['_format'])) {
$reference->attributes['_format'] = $attributes['_format'];
}

$uri = $this->generateFragmentUri($uri, $request);
$reference->attributes = array_merge($attributes, $reference->attributes);
}
Expand Down

0 comments on commit fa35597

Please sign in to comment.