Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#46 restrict lists, parsing eccentricity

cannot reproduce
closed-works-for-me
htsearch (60)
5
2001-06-14
2001-06-13
Nathan Hand
No

If you create a custom select list

build_select_list: .... my_names ....
my_names: "foo" "bar" \ "baz" "yuk" \*SPACE*
"gob" "boo"

The space shouldn't be there of course, but htsearch
doesn't handle this gracefully. It generates binary
garbage in the results page instead of the remainder
of the custom select list.

htdig 3.1.5 on debian/x86 (unstable/testing) using a
precompiled version from package htdig-3.1.5-2.1.

Discussion

  • Nathan Hand
    Nathan Hand
    2001-06-14

    Logged In: YES
    user_id=14659

    > It generates binary garbage in the results page
    > instead of the remainder of the custom select list.

    Brain fart: it /shouldn't/ generate the remainder of the
    list. It should just stop there because it's seen the
    literal space '\ ' followed by an un-escaped newline. It
    should then complain about the "gob" "boo" line.

    Anyway, the binary garbage is what matters.

     
    • milestone: --> cannot reproduce
    • assigned_to: nobody --> grdetil
    • status: open --> closed-works-for-me
     
  • Logged In: YES
    user_id=149687

    I can't quite reproduce this problem. The backslash-space
    sequence
    will be taken as a single backslash, and the definition of
    my_names
    will end there, with 5 items in the list. Because this is
    not a multiple
    of the number you specify as item 4 in build_select_lists,
    that
    template variable just doesn't get defined. In my test,
    there was
    no select list in the output, but there also was no binary
    garbage.

    However, if your template variable has the same name as an
    environment variable, and the latter does contain binary
    garbage,
    this is what you will get. For any template variable
    referenced in
    a template file, if the template variable is undefined,
    htsearch will
    fall back to the environment variable. Could this explain
    your results?

    It's hard to say for sure what's happening with the abridged
    test
    case you gave above. The "gob" "boo" line doesn't make
    htsearch
    complain because it silently ignores invalid definition
    lines in the
    config file.