* [Mail/Reply] Fixed an "out of memory" issue with the quote formatting when replying to a message with very long quoted blocks.  The reported case had quotes that were 25+ levels deep.
[Code Cleanup] Refactored the way BLOCKQUOTEs are converted to plaintext in the DevblocksPlatform::stripHTML() helper.  We now use a DOM parser rather than regular expressions.
6.6.4-checkpoint
Merge branch '6.6.4' into 6.7
[Code Cleanup] Fixed some issues with malformed HTML in DevblocksPlatform::stripHTML().
6.6.4-checkpoint
Merge branch '6.6.4' into 6.7
* [Virtual Attendants/Simulator/Comments] When simulating Virtual Attendant behaviors on the 'New comment on a conversation in group' event, the sample comments will now always be related to the target ticket.  Previously, the random sample comment could come from anywhere.
* [CHD-3698] [Virtual Attendants/Simulator] Improved the "Invalid placeholders" error message when simulating a 'New comment on conversation in group' behavior with the 'comment_record_watchers_email' placeholder and the comment's record has no watchers.  The error now reads "No recipients", which is more explanatory.
* [CHD-3699] [Search/Performance/Usability] The quick search on fulltext fields (e.g. Message content, Comment content) now defaults to using a single phrase unless quotes are explicitly provided.  Previously, a non-quoted sentence would be treated as individual terms using an 'OR' search, which was intensive and often returned results with low relevancy.  This most often happened when searching for people and organization names.  Workers shouldn't have to remember to add quotes, so the new default behavior should improve performance, usability, and relevance.
6.6.4-release checkpoint
Merge branch '6.6.4' into 6.7
* [Platform/Dependencies/Twig] Updated the Twig template engine from 1.8.2 (2012-05-29) to 1.15.1 (2014-02-13).
[Code Cleanup]
* [Search/Performance] Full-text search results will now be retrieved as matching IDs before any other filters are applied.  In most cases, this is much faster and more efficient than trying to do everything at once.  This improvement makes it possible to consistently cache the results of full-text searches, even when other filters on the same worklist change.  Previously, each variation of filters would require a different cache, and this could quickly overwhelm the default query cache settings in MySQL.  Additionally, full-text results are now sorted by relevancy (best fit for the given search terms) and the top 250 matches are returned.  Previously, relevancy wasn't considered at all, and any number of results were returned (even hundreds of thousands), which was very inefficient.  The scope can be narrowed by searching for more specific terms.  This "pre-fetch" step for full-text searching also makes it very easy for Cerb to integrate with other search engines like Sphinx, Solr, Elasticsearch, etc.
[Search/Performance] Implemented the full-text improvements for all records.
* [Search/Platform/Plugins] Cerb's built-in MySQL full-text search engine now supports attributes (textual or numeric).  This makes it possible to segment the indexed content.  For instance, the comment content index now has a 'context' attribute, which can restrict text matches to only comments of a specific type (ticket, task, opp, etc).  This was a necessary change due to the other improvements in full-text searching, since it would have been possible for search text to match 250 comment records without any of them belonging to the appropriate type of record.  Each search schema can define its own attributes, and these will be automatically added when a new fulltext_* table is created.  Most specialized search engines (like Sphinx) already have the capability to track attributes, and this change will make it easier for Cerb to seamlessly integrate with them.
* [Placeholders/Snippets/Virtual Attendants] Added a 'secs_pretty' filter to placeholders.  This displays a number of elapsed seconds as a human readable label like '2 hours, 5 mins'.
[Code Cleanup/Search] Added an interface for search engines.  Converted the 'context' attribute to 'context_crc32' for the comment_content fulltext index.  This should be more efficient than storing and filtering by strings, since there are only a handful of possible context values.  This also improves integration with Sphinx since it can't filter by strings (only fulltext against them).
[Code Cleanup/Search] Formalized Devblocks search schemas as extensions.