Skip to content

Commit

Permalink
Merge pull request #49 from ziggycrane/security_updates
Browse files Browse the repository at this point in the history
Fix #44: XSS bugs and according improvements
  • Loading branch information
roboc committed May 15, 2018
2 parents 8b131b4 + a5a08c1 commit 5d8a861
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions src/Admin/Form/Fields/Slug.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,15 @@ protected function getLinkElement()
*/
protected function getLinkValue()
{
$urlToSlug = $this->getUriToSlug();
$urlToSlugElement = Html::span( $this->getUriToSlug() );

if( $urlToSlug )
{
$urlToSlugElement .= '/';
}
$urlToSlug = ltrim($this->getUriToSlug(), "/");
$urlToSlugElement = Html::span( $urlToSlug );

return [
[
url( '/' ),
'/',
$urlToSlugElement,
( $urlToSlug ) ? '/' : ''
],
Html::span( $this->getValue() )
];
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/Grid/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected function getTableColumns()
return $this->getColumnHeader( $column );
} );

$tableColumns->push( Html::th( Html::span( ' ' ) ) );
$tableColumns->push( Html::th( Html::span( ' ' ) ) );

return $tableColumns;
}
Expand Down

0 comments on commit 5d8a861

Please sign in to comment.