pfsense/pfsense — pull request #880 by phil-davis (2014-01-07 15:19:48+00:00)
Title: Check for vertical bars in alias detail descriptions

The descriptions of each entry in an alias are stored in config.xml as a list delimited by "||". So you cannot have "||" in the actual description (or the description effectively splits into the next entry). Also you cannot start or end the description with "|" or it will be very confusing having the config with "|||" in it.
I already made the bulk import check for "||". But now it also checks for descriptions like "|", "|abc", "abc|".
This code validates all that sort of invalid input to the same standard for both bulk import and ordinary edit.
What a nuisance it is to validate correctly when data is stored like this! This also happens a little bit in adding and editing time schedules, if you put "||" in the description of an individual entry and then edit it again. I think that is the only other place in the system that chooses to manipulate a list of item descriptions by putting them all in 1 string separated by "||".