Skip to content

Commit

Permalink
Merge pull request #21 from plone/fix-csrf-protection-encoding
Browse files Browse the repository at this point in the history
Fix csrf protection encoding
  • Loading branch information
MatthewWilkes committed Dec 1, 2015
2 parents 7c6f817 + 23cd9cf commit 75e9628
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 5 additions & 0 deletions docs/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Changelog
- Remove unnecessary test setup.
[timo]

- Fix HTML entities in browse button title
[gaudenz]

- Implement __len__ for PathSource
[gaudenz]

1.0.11 (2015-02-09)
-------------------
Expand Down
3 changes: 3 additions & 0 deletions plone/formwidget/contenttree/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ def __init__(self, context, selectable_filter, navigation_tree_query=None, defau
def __iter__(self):
return iter(self._default_terms)

def __len__(self):
return len(self._default_terms)

def __contains__(self, value):
try:
brain = self._getBrainByValue(value)
Expand Down
8 changes: 1 addition & 7 deletions plone/formwidget/contenttree/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,7 @@ def __call__(self):
if ($(this).siblings('input.searchButton').length != 0) {
return;
}
var input = document.createElement('input');
$(input)
.attr({
'type': 'button',
'value': '%(button_val)s'
})
.addClass('searchButton')
$('<input type="button" value="%(button_val)s" class="searchButton">')
.click(function () {
var parent = $(this).parents("*[id$='-autocomplete']");
var window = parent.siblings("*[id$='-contenttree-window']");
Expand Down

0 comments on commit 75e9628

Please sign in to comment.