It's a common practice by Twitter users, when a reference to an account has to be put in first position without being a direct message, to precede it with a point (.@account).

This causes an undesired formatting in the link, which is formatted as a mailto link by core's filter.

Comments

filippo.ledda’s picture

Here is a simple patch, adding the particular case and calling filter at the end of the process. Can be surely perfected to be more general.

filippo.ledda’s picture

Status: Active » Needs review

Setting to needs review, the patch is now some months working and may be easily included in next releases.

Status: Needs review » Needs work

The last submitted patch, 1: twitter-undesired-mailto-link-2353371-1-7.x.patch, failed testing.

damienmckenna’s picture

Version: 7.x-5.8 » 7.x-5.x-dev
Status: Needs work » Needs review
StatusFileSize
new1.51 KB

Rerolled, and fixed some minor coding standards mistakes.

damienmckenna’s picture

StatusFileSize
new1.41 KB

I wonder if it'd work without the period in front of the @ symbol?

damienmckenna’s picture

Category: Feature request » Bug report
Priority: Minor » Normal
damienmckenna’s picture

StatusFileSize
new1.43 KB

Added a comment. This is for 7.x-5.x.

damienmckenna’s picture

Version: 7.x-5.x-dev » 7.x-6.x-dev
StatusFileSize
new1.43 KB

This is for 7.x-6.x.

damienmckenna’s picture

Version: 7.x-6.x-dev » 6.x-5.x-dev
StatusFileSize
new1.22 KB

This is for 6.x-5.x.

damienmckenna’s picture

Version: 6.x-5.x-dev » 7.x-5.x-dev
StatusFileSize
new5.49 KB

So I did some more testing and it turns out that the problem was a little more complicated - the patch didn't fix the problem and it also wasn't going to fix the "Formatted tweet" views field. I've moved the text formatting into its own function twitter_filter_message() and reworked the output to use it.

This patch is for 7.x-5.x.

damienmckenna’s picture

StatusFileSize
new7.34 KB

This has been refactored to leverage the existing text filter functions. I've also improved those functions slightly by making the $filter argument optional and by giving them some documentation.

damienmckenna’s picture

Version: 7.x-5.x-dev » 7.x-6.x-dev
StatusFileSize
new7.34 KB

Ported to 7.x-6.x.

Status: Needs review » Needs work

The last submitted patch, 12: twitter-n2353371-12-7.x-6.x.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new7.38 KB

A slightly updated patch for 7.x-6.x.

damienmckenna’s picture

Version: 7.x-6.x-dev » 7.x-5.x-dev
StatusFileSize
new7.38 KB

For 7.x-5.x.

damienmckenna’s picture

Version: 7.x-5.x-dev » 6.x-5.x-dev
StatusFileSize
new6.37 KB

For 6.x-5.x.

The last submitted patch, 14: twitter-n2353371-13-7.x-6.x.patch, failed testing.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed 76943c4 on 6.x-5.x
    Issue #2353371 by DamienMcKenna, filippo.ledda: Fix tweet formatting so...

  • DamienMcKenna committed e197c11 on
    Issue #2353371 by DamienMcKenna, filippo.ledda: Fix tweet formatting so...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.