-
Notifications
You must be signed in to change notification settings - Fork 138
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
Preserve linefeeds #81
Conversation
Replace '\n' with '<br/>'.
While this is currently not very useful in the web client, someone using a commandline client may be able to excert greater control over the message format. |
This looks sensible. Paging @miguelfreitas to accept. |
The patch works as such. However, I believe it exposes a fault in the way links are detected and hightlighted. See, if I send the string
on the postboard. BUT if I send the string `"A\nB\nC\n\nhttp://www.google.com/\n\n:-)" I will see
on the postboard instead of
I haven't had the time to look into this. |
Another things is: The msg = msg.replace(/\r\n/g, '<br/>');
msg = msg.replace(/\r/g, '<br/>');
msg = msg.replace(/\n/g, '<br/>'); in order to cover all possible cases? |
I'd rather have this as an option. I know Twitter started accepting linefeeds last year or so, but they have other means of filtering messages we don't. What if people start posting 140 line feeds in a message? the timeline won't look pretty and we won't be able to do anything about it. IMHO this belong to config page, as much as: (1) showing messages which start with @someoneelse (2) following somebody just to process DMs, not to show on timeline, etc. |
For the record, the actual regex to use is |
@miguelfreitas, a user posting 140 linefeeds time and again would soon see himself without any followers. Problem solved. |
hmmm... what about a promoted message with 140 line feeds? :) |
@miguelfreitas, if someone wants to waste CPU cycles on having the chance to send out a few twists with 140 linefeeds, so be it — I rarely see a promoted message (wild guess: once a week). |
We could just have some hard-coded line limit, as we have for chars. Five or ten would suffice, I think |
I like the idea of limiting the number of linefeeds. |
Limiting the numer of linefeeds could be a good compromise. |
obsolete |
Replace '\n' with a br/ HTML tag.