I originally opened an issue for this in the MetaTag issue queue but thinking on it for a bit I realize that this is probably more of a Token issue.

So we have a field in one of our Content Types. It will have a url something like this:

https://s3.amazonaws.com/hdshdgd/styles/large/s3fs/2016-02/n_0.gif?itok=vYk2jRqy
or this:
https://s3.amazonaws.com/hdshdgd/styles/max_650x650/s3fs/2016-02/body.gif?itok=FZCOqm4n
(obfuscated the urls)

In the MetaTag admin we're using that field's token to populate the metatag. In the html source this is what we get instead of the actual url:

<meta name="parsely-image-url" content="
                



      " />

That is, it is outputting spaces and new lines.

Comments

StevenPatz created an issue. See original summary.

Berdir’s picture

Status: Active » Postponed (maintainer needs more info)

Not sure what token you are using, but the default field token renders the field using the default settings. here, that probably means an image tag, which is then filtered out.

The latest alpha has much better support for fields already, but what you probably want is #2611866: Add image style tokens for image fields which will allow to create a token for a specific image style.

StevenPatz’s picture

Status: Postponed (maintainer needs more info) » Active

It's just a text field that will be populated with a Amazon S3 string that points to an image.

Berdir’s picture

Status: Active » Postponed (maintainer needs more info)

I don't think it is a token issue. Getting things escaped correctly into a metatag field is tricky. Also what token exactly did you use? The default :field_name tokens actually render the field, so it might look like that with the full field template and then the tags stripped. Try the new :field_name:value tokens in the dev version.

StevenPatz’s picture

We're actually going to be updating our modules in the next few weeks, so I can test it then.

Berdir’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No feedback, closing as cannot reproduce then. Feel free to re-open if you still have this problem.

StevenPatz’s picture

Looks like it may have been resolved. I no longer work for the company this was happening with, but viewed the source of one of their pages and I don't see multiple line metatags as reported.