Documentation Source Text

Check-in [2528553d5a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Restrict website search text to omit non-alphanumeric characters.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2528553d5ad46f9b66d025beedf142bd7e5e95fb
User & Date: drh 2011-05-24 00:44:11.522
Context
2011-05-24
00:52
Added preliminary documentation for the SAVEPOINT methods in virtual tables. (check-in: 3dded2adf9 user: drh tags: trunk)
00:44
Restrict website search text to omit non-alphanumeric characters. (check-in: 2528553d5a user: drh tags: trunk)
2011-05-23
19:04
Edits to the VFS documentation. Better cross-referencing to VFS. (check-in: e63c0ce4fb user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to search/search.tcl.
178
179
180
181
182
183
184

185
186
187
188
189
190
191
proc erank {matchinfo args} {
  eval rank [list $matchinfo] $args
}


proc searchresults {} {
  if {![info exists ::A(q)]} return ""


  # Count the '"' characters in $::A(q). If there is an odd number of
  # occurences, add a " to the end of the query so that fts3 can parse
  # it without error.
  if {[regexp -all \x22 $::A(q)] % 2} { append ::A(q) \x22 }

  set ::TITLE "Results for: \"[htmlize $::A(q)]\""







>







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
proc erank {matchinfo args} {
  eval rank [list $matchinfo] $args
}


proc searchresults {} {
  if {![info exists ::A(q)]} return ""
  regsub -all {[^a-z0-9]} [string tolower $::A(q)] { } ::A(q)

  # Count the '"' characters in $::A(q). If there is an odd number of
  # occurences, add a " to the end of the query so that fts3 can parse
  # it without error.
  if {[regexp -all \x22 $::A(q)] % 2} { append ::A(q) \x22 }

  set ::TITLE "Results for: \"[htmlize $::A(q)]\""