Skip to content

Need to escape '|' pipe characters in regex matches on Windows #39

@brian-mcmaster

Description

@brian-mcmaster

Just ran into another issue with LDTP here at Tableau Software. We use pipe characters to delimit our Pseudoloc strings, so and example string looks like this: "23153-|Blah|"

This causes problems because the pipe characters don't get escaped in the internal regex matches in Utils.cs, so it considers the '|' characters to be 'or'. And since the string ENDS in a pipe character, it matches any control with a caption of empty string, which is really bad.

It's an easy fix, just have to escape the pipe characters in line 144 of ldtpd\Utils.cs and make them be '|' just like the rest of the escapes. In addition, I had to add this around line 626 in the same file:
tmp = Regex.Replace(tmp, @"|", @"|");

I haven't tested this on other non-Windows platforms yet.

Thanks,
Brian McMaster
Principal Software Test Engineer
Tableau Software (http://www.tableau.com)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions