Version: 2.5.3 Reporter: Geert van der Heide —
This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report
If the first 50 words of the content used as an excerpt contains an email address link, it shows up as the following string in the search excerpt:
(JavaScript must be enabled to view this email address)/*= 0){out += unescape(l.replace(/^ss*/, '&#'));}while (—j >= 0){/**/if (el[j].getAttribute('data-eeEncEmail_xuRFSOMuNH')){el[j][removed] = out;}}/*]]>*/
This happens because auto_link is set to true in the code before the search excerpt is created. The html gets stripped after that, leaving the above string for all to see in the output on the search results page. This happens regardless of whether the setting “Automatically turn URLs and email addresses into links?” is on or off in the channel settings, and it shouldn’t happen either way.
Expected result: email links in excerpts should show up as a plain text email address.
Change the following in system/expressionengine/modules/search/mod.search.php on line 1477:
‘auto_links’ => ‘y’
to:
‘auto_links’ => ‘n’
This fix isn’t thoroughly tested and might not be a perfect solution. It works for me though.
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```