Developer forum

Forum » CMS - Standard features » Slash being removed

Slash being removed

Nuno Aguiar
Reply

Hi,

 

We need to place multiple google-site-verification meta tags in a website, but the verification was always failing. We noticed that the rendered page does not have the final slash closing the <meta> element and that seems to be the reason. 

<meta name="google-site-verification" content="XPG_ilTN(...)Pom8i20">

 

The slash is in the Master file, and we've tried:

  • Going into the website settings changing the document HTML type (http://manual.dynamicweb-cms.com/Default.aspx?ID=7273#30588) to all options with no luck.
  • Creating a closing element: <meta ...></meta> (with nothing between them, with a space, with a &nbsp; - same result)
  • Forcing the slash in the parsed files (not desirable but gave it a shot)

 

Can somebody take a look at www.magpul.com and help?

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Nuno

I think it is the Html Agility Pack that does it.

Try using this format instead: <meta name=""></meta>

Or if Razor, you can do something ugly like @"<me" + "ta name="google-site-verification" content="XPG_ilTN(...)Pom8i20">"

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Had tried the 1st option with no success

As for the ugly Razor approach. I tried it a number of ways and never got it to work.

 

Is this issue something you would have somebody investigate nonetheless? Looks like the wrong behaviour. I will still keep trying different approaches.

 

Best Regards,

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

Hi Nuno

If the Razor ninja trick does not work, I do not think it is DW..... The template is parsed only once, and then run as a Razor from that. What does the parsed template look like?

BR Nicolai

 
Nuno Aguiar
Reply

Hi Nicolai,

 

The parsed template does not have the final slash. I tried adding it with no luck. Check attachment for the parsed and original templates.

 

One thing we notice is that DW's meta tags do have the final slash, but not the <meta> we hardcode into the templates

 

Best Regards,

 

You must be logged in to post in the forum