1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-09 11:42:28 +01:00

Sanitised URLs (#420)

Escape special characters in long URLs in DataTables
This commit is contained in:
Sam Ezeh 2018-02-20 04:18:19 +00:00 committed by Chaoyi Zha
parent b80e422275
commit a243a87de8

View File

@ -17,8 +17,8 @@ class AdminPaginationController extends Controller {
/* Cell rendering functions */
public function renderLongUrlCell($link) {
return '<a target="_blank" title="' . e($link->long_url) . '" href="'. $link->long_url .'">' . str_limit($link->long_url, 50) . '</a>
<a class="btn btn-primary btn-xs edit-long-link-btn" ng-click="editLongLink(\'' . $link->short_url . '\', \'' . $link->long_url . '\')"><i class="fa fa-edit edit-link-icon"></i></a>';
return '<a target="_blank" title="' . e($link->long_url) . '" href="'. e($link->long_url) .'">' . e(str_limit($link->long_url, 50)) . '</a>
<a class="btn btn-primary btn-xs edit-long-link-btn" ng-click="editLongLink(\'' . e($link->short_url) . '\', \'' . e($link->long_url) . '\')"><i class="fa fa-edit edit-link-icon"></i></a>';
}
public function renderClicksCell($link) {