Skip to main content


Parens in Tags


!Friendica Support
In future versions of Friendica, is it possible to not include parens (specifically close parens) in tags the same way you can't use other punctuation? (so that this doesn't #happen)

Friendica Support reshared this.

in reply to Jonathan Lamothe

Maybe Lisp programmers need parens in tags? 😉

Friendica Support reshared this.

in reply to Jonathan Lamothe

or you can have them but they #|Must be enclosed in pipes ;)|
@helpers
This entry was edited (1 month ago)

Friendica Support reshared this.

in reply to Jonathan Lamothe

@Jonathan Lamothe Yes, it would require some clever Regular Expression skill to only include matching parentheses, we already do it for the autolinker, but it's black magic to me.
in reply to Hypolite Petovan

@Hypolite Petovan Is there a context in which it makes sense to include any parens in a hashtag, matching or not?

Friendica Support reshared this.

in reply to Jonathan Lamothe

@Jonathan Lamothe We have a pretty lax policy when it comes to hashtags. We accept letters, numbers and special characters including spaces (even though I don't think we match them, but I can see them in the autocompletion from received posts' tags).

We could tighten the accepted range to exclude some characters, but how do you decide which ones?

in reply to Hypolite Petovan

@Hypolite Petovan I mean, for matching when a post is made, I'd personally stick with alphanumeric (plus perhaps underscore?)

If you want to add other characters, perhaps some kind of notation for deliberately doing that, such as @screwlisp's suggestion here? (which may have been tongue-in-cheek, but...)


or you can have them but they #|Must be enclosed in pipes ;)|
@helpers

Friendica Support reshared this.

in reply to Jonathan Lamothe

@Jonathan Lamothe Sure, but that includes several punctuation and special characters, and I'd rather not have to whack-a-mole my way through the Unicode pages. A matching parentheses regular expression sounds less daunting.
in reply to Jonathan Lamothe

@Jonathan Lamothe @Hypolite Petovan so what actually would be needed is the regex to exclude all the unwanted characters, like parenthesis or no width space and then whenever we find some character that should terminate a tag we can add it to the regex.

@Hypolite Petovan out of interest, do you know where this is done in the code?

in reply to utzer [Friendica]

@utzer [Friendica] @Jonathan Lamothe I do, but again this requires us to make a decision about what characters can or cannot be used in a hashtag, something we have never done so far.
in reply to Hypolite Petovan

@Hypolite Petovan yes I know, but we could start with some basics that are annoying... "zero width space" and brackets would be something... oh and dots.
@Jonathan Lamothe

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.