Feed generator separates lists of tags incorrectly

Steps to reproduce

Steps to reproduce:
1. Open the configuration file for one of the defined feeds in $OPENCAST_ETC/feeds. For instance, $OPENCAST_ETC/feeds/series.properties
2. Modify the properties feed.rsstags and feed.atomtags and include tags with non-alphabetical characters, such as "example-tag"
3. Modify a workflow in order to tag published elements with the given tag.
4. Open the URL <your-engage-server>/feeds/rss/2.0/latest?size=10

Actual Results:
The mediapackages published with the aforementioned tags are not displayed in the feed

Expected Results:
The mediapackages with the tags indicated in feed.rsstags should be included in the corresponding feed.

Workaround (if any):
Use tags with alphanumerical characters only

Activity

Show:
Rubén Pérez
July 26, 2017, 1:15 PM

As discussed in the mailing list, the problem comes from an incorrect splitting of the tag list. According to the documentation:

> feed.rsstags: A comma, semi-colon or space-separated list of tags used to filter available enclosures
> feed.atomtags: A comma, semi-colon or space-separated list of tags used to filter available enclosures

However, the code of the 'AbstractFeedGenerator' class contains:

> rssTags.split("
W")

"\W" is a pattern which, according to the Java documentation, matches:
> \W A non-word character:

> \w A word character: [a-zA-Z_0-9]

That is to say, all characters other than letters, numbers and the underscore ("_") will be interpreted as list delimiters, which prevents the use of tags with "special" characters. In particular, the hyphen ("-") is very often used in tags but would not be allowed according to the current code.

All the instances of String#split("
W") will be changed to a more selective expression.

Fixed and reviewed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Rubén Pérez

Reporter

Rubén Pérez

Severity

Incorrectly Functioning With Workaround