Changeset 10569


Ignore:
Timestamp:
01/19/11 04:41:29 (2 years ago)
Author:
SvenDowideit
Message:

Item10269: it looks like PurePerl search has never been able to search for text/more, as there was a bug in the escaping code - this adds a unit test for it, and fixes the regex

Location:
branches/Release01x01
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x01/UnitTestContrib/test/unit/Fn_SEARCH.pm

    r10514 r10569  
    11511151%META:FIELD{name="form" attributes="" title="Blah" value="form good"}% 
    11521152%META:FIELD{name="FORM" attributes="" title="Blah" value="FORM GOOD"}% 
     1153%META:FIELD{name="NewField" attributes="" title="Item10269" value="TaxonProfile/Builder.TermForm"}% 
    11531154%META:FILEATTACHMENT{name="porn.gif" comment="Cor" date="15062" size="15504"}% 
    11541155%META:FILEATTACHMENT{name="flib.xml" comment="Cor" date="1157965062" size="1"}% 
     
    44674468} 
    44684469 
     4470#TaxonProfile/Builder.TermForm 
     4471sub verify_Item10269 { 
     4472    my $this = shift; 
     4473 
     4474    $this->set_up_for_queries(); 
     4475 
     4476    my $result = 
     4477      $this->{test_topicObject} 
     4478      ->expandMacros( '%SEARCH{"NewField=\'TaxonProfile/Builder.TermForm\'"' . $stdCrap ); 
     4479    $this->assert_str_equals( 'QueryTopicTwo', $result ); 
     4480} 
     4481 
    446944821; 
  • branches/Release01x01/core/lib/Foswiki/Store/SearchAlgorithms/PurePerl.pm

    r7939 r10569  
    3333        # Escape /, used as delimiter. This also blocks any attempt to use 
    3434        # the search string to execute programs on the server. 
    35         $searchString =~ s!/!\\/!g; 
     35        $searchString =~ s!/!\/!g; 
    3636    } 
    3737    else { 
Note: See TracChangeset for help on using the changeset viewer.