Bug 82651 - Limit content length for CALL SNIPPETS

git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1609 6955db30-a419-402b-8a0d-67ecbb4d7f56
remotes/github/custis
vfilippov 2012-10-15 13:48:47 +00:00 committed by Vitaliy Filippov
parent e854e254f9
commit 8492aa772e
1 changed files with 1 additions and 1 deletions

View File

@ -648,7 +648,7 @@ class CheckinDatabase:
def get_snippet(self, sph, content, query, mimetype):
sph.execute(
'CALL SNIPPETS(%s, %s, %s'+self.snippet_options_str+')',
(content, self.sphinx_index, query) + tuple(self.snippet_options.values())
(content[0:self.content_max_size-1], self.sphinx_index, query) + tuple(self.snippet_options.values())
)
s, = sph.fetchone()
s = cgi.escape(s)