• Resolved alexcox

    (@alexcox)


    I am currently testing what features I can use in wordpress that translate into Facebook Instant and Love the hide feature!

    I am testing the Geo Tagged maps and have added the code below.

    [wpna hide='wp']
    <!-- A map within your article -->
    <figure class="op-map"><figcaption>
    <h1>Map Example</h1>
    The pin on this map designates Facebook Media Central’s offices in New York City.
    
    </figcaption><script type="application/json" class="op-geotag">  
            {
              "type": "Feature",
              "geometry": 
                {
                  "type": "Point",
                  "coordinates": [ [40.730852, -73.991364], [40.730852, -73.991364] ]    
                },    
              "properties": 
                {      
                  "title": "770 Broadway, Manhattan, New York",      
                  "radius": 100000,      
                  "pivot": true,      
                  "style": "satellite",
                }
            }  
          </script></figure>
    [/wpna]

    When I view the feed it seams to be adding CDATA commenting. Note this is not visible in the post code, only the feed.

    <figure class="op-map"><figcaption><h1>Map Example</h1>
    The pin on this map designates Facebook Media Central’s offices in New York City.
    
    </figcaption><script type="application/json" class="op-geotag"><![CDATA[  
            {
              "type": "Feature",
              "geometry": 
                {
                  "type": "Point",
                  "coordinates": [ [40.730852, -73.991364], [40.730852, -73.991364] ]    
                },    
              "properties": 
                {      
                  "title": "770 Broadway, Manhattan, New York",      
                  "radius": 100000,      
                  "pivot": true,      
                  "style": "satellite",
                }
            }  
          ]]></script></figure

    Can you assist in how to resolve this as I can then create some amazing instant posts with the use of the plugin ??

Viewing 1 replies (of 1 total)
  • Plugin Author OzTheGreat

    (@ozthegreat)

    Hi,

    Thanks for getting in touch and thanks for letting us know, I’ve tested and you’re right, it definitely shouldn’t add the CDATA. We’ll fix it in the next release, meanwhile you can add the below code to line 610 of the /wp-native-articles/includes/functions-helper.php to fix it temporarily for you. It should look like this screenshot afterwards. If you have any issues just let me know!

    All the best

    $output = str_replace( array( '<![CDATA[', ']]>' ), '', $output );

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin adding CDATA to code in Feed’ is closed to new replies.