Replacing remote images with local uploaded images issue


(Eric Vantillard) #1

reprocase:

  • insert an image (using an external url) in a post using a link reference.
  • wait for the system to replace the external url with an uploaded copy.
  • the url is replaced by an html <img> tag.

bug: the url in the refence il also replaced with the html <img> tag.


(Mittineague) #3

I’m not following.

Are you saying you want the link to an image in the post to not be changed into the image?

That is the expected behavior.

If you want the link to stay a link don’t put it on it’s own line
Or enclose it in backticks so it gets rendered as a text URL


(Eric Vantillard) #4

No @Mittineague, this is not the point.

Maybe this gist will help:


(Mittineague) #5

Ahh, you’re not using the correct MarkDown syntax for links.

http://daringfireball.net/projects/markdown/syntax#link

It should be
[link text here] (URL here)

* with the URL in parentheses not as HTML or a “raw” URL

EDIT
:d’oh:
Sorry, I misunderstood what you’re wanting to do. Not a link, but

http://daringfireball.net/projects/markdown/syntax#img

Reference-style image syntax looks like this:

![Alt text][id]

Where “id” is the name of a defined image reference. Image references are defined using syntax identical to link references:

[id]: url/to/image “Optional title attribute”


(Eric Vantillard) #6

Let try my example on meta:

Ou est Charlie ?

Char


(Mittineague) #7

Let me try

![Char](http://img.over-blog.com/4/22/39/26/Personnages-ridicules/Charlie/Where-is-waldo-ou-est-charlie.jpg)

Char

Same thing happens

<img src="http://img.over-blog.com/4/22/39/26/Personnages-ridicules/Charlie/Where-is-waldo-ou-est-charlie.jpg" alt="Char" height="308" width="292">

(Eric Vantillard) #8

Did you confirm this is a bug ?


(Mittineague) #9

I don’t know. What is the expected behavior?


(Eric Vantillard) #10

expected result shoud be :

exemple here :

Ou est Charlie ?

![Char][Charlie]

[Charlie]: /uploads/default/original/1X/70bdb0afec7b129ae882d21587d82d09c2f0a6c3.png

and not :

exemple here :

Ou est Charlie ?

![Char][Charlie]

[Charlie]: <img src='/uploads/default/original/1X/70bdb0afec7b129ae882d21587d82d09c2f0a6c3.png'>

(Mittineague) #11

Where are you seeing that? I can’t find it.


(Eric Vantillard) #12

you need to wait some job maybe this one:


(Eric Vantillard) #13

the problem seems to be in this regexp because my link reference is not a number :


(Jeff Atwood) #14

I see we should probably fix that @zogstrip.