Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags for discussion topics are saved with a leading space #8123

Closed
brettp opened this Issue Apr 8, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@brettp
Copy link
Member

brettp commented Apr 8, 2015

The discussion/save action uses split(",", $tags) instead of string_to_tag_array(), so surrounding whitespace is saved as part of the tag.

This looks like it was introduced in 1.8, so fixing it will require an update to trim whitespace on existing tags.

@brettp brettp self-assigned this Apr 8, 2015

@brettp

This comment has been minimized.

Copy link
Member Author

brettp commented Apr 8, 2015

This was actually introduced in 1.9. 1.9's Elgg_Database::sanitizeString() doesn't trim but <= 1.8's sanitise_string() did. This means all metastrings added since 1.9 are not trimmed.

IMHO this is regression with at least adding metastrings, and possibly with sanitizeString(). Are there any use cases for metastrings with whitespace padding?

@beck24

This comment has been minimized.

Copy link
Member

beck24 commented Apr 8, 2015

I can't think of any

@Srokap Srokap removed the in progress label Apr 10, 2015

brettp added a commit to brettp/Elgg that referenced this issue Apr 15, 2015

fix(tags): Corrected cases of tags having leading or trailing spaces.
Metastrings for annotation and metadata name and values are again trimmed before saving.

Fixes Elgg#8123

brettp added a commit to brettp/Elgg that referenced this issue Apr 15, 2015

fix(tags): Corrected cases of tags having leading or trailing spaces.
Metastrings for annotation and metadata name and values are again trimmed before saving.

Fixes Elgg#8123

brettp added a commit to brettp/Elgg that referenced this issue Apr 15, 2015

fix(tags): Corrected cases of tags having leading or trailing spaces.
Metastrings for annotation and metadata name and values are again trimmed before saving.

Fixes Elgg#8123

@jdalsem jdalsem closed this Apr 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.