reiern70 opened a new issue, #2050:
URL: https://github.com/apache/wicket/issues/2050

   #1667 (WICKET-6938) lets an autocomplete selection be handled without 
`eval()`: the autocompleter dispatches a cancelable, bubbling 
`wicket-autocomplete-select` event on the input field, and 
`AbstractAutoCompleteRenderer#getChoiceData(T)` writes the data a listener 
needs as `data-*` attributes of the choice. 
`AbstractAutoCompleteRenderer#getOnSelectJavaScriptExpression(T)` is deprecated 
for removal since 10.13.0: its expression is written into an `onselect` 
attribute and run with `eval()`, which the default Content Security Policy 
blocks.
   
   Removing a protected method of `AbstractAutoCompleteRenderer` is 
binary-incompatible, so it waits for a major release. In Wicket 12, remove:
   
   - `AbstractAutoCompleteRenderer#getOnSelectJavaScriptExpression(T)` and the 
`onselect` attribute that `render()` writes from it;
   - `evalOnSelect` in `wicket-autocomplete.js`, so that `handleSelection` 
dispatches the event with the text value only;
   - the tests of the deprecated expression in 
`AbstractAutoCompleteRendererTest` and `autocomplete-test.js`;
   
   and add a section to `migration-to-12.md`: move the expression into a 
`wicket-autocomplete-select` listener and pass the values it needs with 
`getChoiceData`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to