Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing failing tests in JsHelper caused by changed API in HtmlHelper.

  • Loading branch information...
commit 05f908d36d22289402bf8caf9f917790f3e70ded 1 parent dc013da
@markstory markstory authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 cake/libs/view/helpers/js.php
View
10 cake/libs/view/helpers/js.php
@@ -175,7 +175,9 @@ function writeBuffer($options = array()) {
$script = $this->{$this->__engineName}->domReady($script);
}
if (!$options['cache'] && $options['inline']) {
- return $this->Html->scriptBlock($script, $options);
+ $opts = $options;
+ unset($opts['onDomReady'], $opts['cache'], $opts['clear']);
+ return $this->Html->scriptBlock($script, $opts);
}
if ($options['cache'] && $options['inline']) {
$filename = md5($script);
@@ -247,7 +249,11 @@ function link($title, $url = null, $options = array()) {
$event = $this->event('click', $requestString, $options);
}
if (isset($options['buffer']) && $options['buffer'] == false) {
- $out .= $this->Html->scriptBlock($event, $options);
+ $opts = array();
+ if (isset($options['safe'])) {
+ $opts['safe'] = $options['safe'];
+ }
+ $out .= $this->Html->scriptBlock($event, $opts);
}
return $out;
}
Please sign in to comment.
Something went wrong with that request. Please try again.