Skip to content

Commit

Permalink
Create handle on non sanitized value
Browse files Browse the repository at this point in the history
We must never create handle on sanitized value since it will create
weird stuff. The creatHandle() function good to deal with un-sanitized
data since it will remove anything that is dangerous.

Fixes #82
  • Loading branch information
nitriques committed May 5, 2016
1 parent 94d08f1 commit e2d2a45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fields/field.selectbox_link.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = fa

$item = new XMLElement('item');
$item->setAttribute('id', $relation['id']);
$item->setAttribute('handle', Lang::createHandle($relation['value']));
$item->setAttribute('handle', Lang::createHandle(General::reverse_sanitize($relation['value'])));
$item->setAttribute('section-handle', $relation['section_handle']);
$item->setAttribute('section-name', General::sanitize($relation['section_name']));
$item->setValue($relation['value']);
Expand Down

0 comments on commit e2d2a45

Please sign in to comment.