extra code being added in extension builder

This section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Forum rules
This forum section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Post Reply
bbowers2015
 
 
Posts: 6
Joined: Sat May 30, 2015 1:30 pm

extra code being added in extension builder

Post by bbowers2015 » Sat May 30, 2015 1:40 pm

I'm working on an extension to add text formatted for local business markup microdata. I've created the extension and it is working except for some extra code being added to the div tags.

Here is what I have in the "Between <body></body> tags" section (and this is the format requirement by schema.org)

Code: Select all

<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">


When actually rendered through the built extension, it appears in the html as

Code: Select all

<div itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress">
You'll notice an additional ="" is being added after itemscope.

Is there a workaround for this?

User avatar
Pablo
 
Posts: 19288
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: extra code being added in extension builder

Post by Pablo » Sat May 30, 2015 1:43 pm

This probably means that you have enabled the HTML beautifier in Tools->Options->HTML

bbowers2015
 
 
Posts: 6
Joined: Sat May 30, 2015 1:30 pm

Re: extra code being added in extension builder

Post by bbowers2015 » Sat May 30, 2015 5:36 pm

Hello Pablo and thanks for the suggestion!

I checked and the HTML beautifier is not enabled in WWB10.

After digging in a little deeper, I did verify that the extra ="" is NOT added by extension builder, as it isn't seen in the Preview through the builder.
It appears it is something in WWB10 that is adding it in.

bbowers2015
 
 
Posts: 6
Joined: Sat May 30, 2015 1:30 pm

Re: extra code being added in extension builder

Post by bbowers2015 » Sat May 30, 2015 5:41 pm

While this may still be a "bug" to be worked out, I have run the generated code through google's markup checker and it passed ok as generated - so it's not a big problem in this case. I appreciate the help though!

Thank you.

User avatar
Pablo
 
Posts: 19288
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: extra code being added in extension builder

Post by Pablo » Sat May 30, 2015 5:45 pm

This is not a bug. The code you have added is not valid HTML code.

bbowers2015
 
 
Posts: 6
Joined: Sat May 30, 2015 1:30 pm

Re: extra code being added in extension builder

Post by bbowers2015 » Sat May 30, 2015 7:53 pm

It is structured data and is very useful content annotation for local business websites.

https://developers.google.com/structured-data/

User avatar
Pablo
 
Posts: 19288
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: extra code being added in extension builder

Post by Pablo » Sat May 30, 2015 9:09 pm

Yes, but still is does not conform to the HTML standard. Attributes should have a value.
But you must have enabled the HTML beautifier otherwise the attribute would not be rendered this way.

bbowers2015
 
 
Posts: 6
Joined: Sat May 30, 2015 1:30 pm

Re: extra code being added in extension builder

Post by bbowers2015 » Sun May 31, 2015 6:18 pm

Here's a screengrab of my options in WWB10
Image

User avatar
Pablo
 
Posts: 19288
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: extra code being added in extension builder

Post by Pablo » Sun May 31, 2015 8:10 pm

Did you republish the page?

bbowers2015
 
 
Posts: 6
Joined: Sat May 30, 2015 1:30 pm

Re: extra code being added in extension builder

Post by bbowers2015 » Thu Jun 11, 2015 12:00 pm

I apologize for the late reply on this. The screenshot posted was my original Options setting for the HTML beautifier.

My problem appears to be resolved though. I checked the box to enable it, and saved the settings, then unchecked it and saved settings. Now the extra ="" is gone.

Thanks for your assistance Pablo!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest