@@ -48,6 +48,11 @@
 | 
			
		||||
    {% include "agenda_culturel/single-event/event-single-inc.html" with event=object noedit=1 %}
 | 
			
		||||
  </article>
 | 
			
		||||
  <script>
 | 
			
		||||
    function htmlDecode(str) {
 | 
			
		||||
      const doc = new DOMParser().parseFromString(str, "text/html");
 | 
			
		||||
      return doc.documentElement.textContent;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
    const element = document.querySelector('#id_place');
 | 
			
		||||
    const choices = new Choices(element, {
 | 
			
		||||
      searchResultLimit: 10,
 | 
			
		||||
@@ -57,7 +62,7 @@
 | 
			
		||||
    choices.showDropdown();
 | 
			
		||||
 | 
			
		||||
    setTimeout(() => {
 | 
			
		||||
      const searchTerm = '{{ object.location }}';
 | 
			
		||||
      const searchTerm = htmlDecode('{{ object.location }}');
 | 
			
		||||
      choices.input.focus();
 | 
			
		||||
      choices.input.value = searchTerm;
 | 
			
		||||
      choices._handleSearch(searchTerm);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user