- Could you give me your site page character set (UTF-8 ?) and your $database_connection_charset variable defined in your config file (utf8 ?)
Dear authors of AjaxSearch.
Some of the users of MODx CMS that I manage try to put html code
within the longtitle field sometimes (even if I tell them that it’s
bad idea). When AjaxSearch returns results, it places the longtitle
field within an attribute:
<a href= ... title="[+longtitle+]"> ...
This breaks the webpage. Is there a way to incorporate a php
strip_tags into the template so that if they do, it wont break the
results page? (This goes for any other attributes within the template
that incorporate document/template variables too.)
For the moment I have simply removed the title attribute from the ’a’
element in the template altogether.
Thanks,
Paul
alert("docgrp="+docgrp); var ajaxSearchReq = new Ajax('index-ajax.php', {postBody: pars, onComplete: doSearchResponse});<script type="text/javascript"> <!-- as_opacity = '1'; stripHtml = 1; ... docgrp = '2,3'; highlightResult = 1; listIDs = '22,29,26,27,21,34,24,25,13,12,38,36,37,10,20,19,18,17,11,35'; --> </script>
SELECT DISTINCT sc.id, sc.pagetitle, sc.description, sc.content, sc.introtext, sc.longtitle FROM `modx_site_content` sc LEFT JOIN `modx_site_tmplvar_contentvalues` stc ON sc.id = stc.contentid LEFT JOIN `modx_document_groups` dg ON sc.id = dg.document WHERE ((sc.pagetitle LIKE '%chine%' OR sc.description LIKE '%chine%' OR sc.content LIKE '%chine%' OR sc.introtext LIKE '%chine%' OR stc.value LIKE '%chine%')) AND sc.id IN (22,29,26,27,21,34,24,25,13,12,38,36,37,10,20,19,18,17,11,35) AND (ISNULL(dg.document_group) OR dg.document_group IN (2%2C3)) AND sc.published = 1 AND sc.searchable=1 AND sc.deleted=0;
Erreur requête SQL: Documentation SELECT DISTINCT sc.id, sc.pagetitle, sc.description, sc.content, sc.introtext, sc.longtitle FROM `modx_site_content` sc LEFT JOIN `modx_site_tmplvar_contentvalues` stc ON sc.id = stc.contentid LEFT JOIN `modx_document_groups` dg ON sc.id = dg.document WHERE ( ( sc.pagetitle LIKE '%chine%' OR sc.description LIKE '%chine%' OR sc.content LIKE '%chine%' OR sc.introtext LIKE '%chine%' OR stc.value LIKE '%chine%' ) ) AND sc.id IN ( 22, 29, 26, 27, 21, 34, 24, 25, 13, 12, 38, 36, 37, 10, 20, 19, 18, 17, 11, 35 ) AND ( ISNULL( dg.document_group ) OR dg.document_group IN ( 2 % 2C3 ) ) AND sc.published =1 AND sc.searchable =1 AND sc.deleted =0 LIMIT 0 , 30 MySQL a répondu:Documentation #1054 - Unknown column '2C3' in 'where clause'
docgrp: escape(docgrp),
docgrp: docgrp,

This discussion is closed to further replies. Keep calm and carry on.