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-67ecbb4d7f56remotes/github/custis
parent
e854e254f9
commit
8492aa772e
|
@ -648,7 +648,7 @@ class CheckinDatabase:
|
||||||
def get_snippet(self, sph, content, query, mimetype):
|
def get_snippet(self, sph, content, query, mimetype):
|
||||||
sph.execute(
|
sph.execute(
|
||||||
'CALL SNIPPETS(%s, %s, %s'+self.snippet_options_str+')',
|
'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, = sph.fetchone()
|
||||||
s = cgi.escape(s)
|
s = cgi.escape(s)
|
||||||
|
|
Loading…
Reference in New Issue