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.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2528553d5ad46f9b66d025beedf142bd7e5e95fb
User & Date: drh 2011-05-24 00:44:11
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
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to search/search.tcl.

   178    178   proc erank {matchinfo args} {
   179    179     eval rank [list $matchinfo] $args
   180    180   }
   181    181   
   182    182   
   183    183   proc searchresults {} {
   184    184     if {![info exists ::A(q)]} return ""
          185  +  regsub -all {[^a-z0-9]} [string tolower $::A(q)] { } ::A(q)
   185    186   
   186    187     # Count the '"' characters in $::A(q). If there is an odd number of
   187    188     # occurences, add a " to the end of the query so that fts3 can parse
   188    189     # it without error.
   189    190     if {[regexp -all \x22 $::A(q)] % 2} { append ::A(q) \x22 }
   190    191   
   191    192     set ::TITLE "Results for: \"[htmlize $::A(q)]\""