• Hi,

    My AMP pages have just started to be index by google and the validator is throwing error back at me so I made a small modification to the template adding a function around
    do_shortcode(MAMP_Render::replaceForAMP($postContent)) to replace a few attributes of elements.

    I imagine you can come up with a cleaner solution than this, but below is what I am using remove errors from forms and schema.

    $Result1 = preg_replace('#\s(property|typeof)="[^"]+"#', '', $Content);
    $Result2 = str_replace("action=\"","action-xhr=\"",$Result1); 

    Thanks, Luke.
    Free Spirit Development.

Viewing 1 replies (of 1 total)
  • Plugin Author Supremacy Digital

    (@seosupremacy)

    Hi @lukemovement

    Thanks for your interest in AMP Supremacy.

    We appreciate that you were able to find the solution to issue you faced through our plugin and thanks for sharing your solution with us, we will definitely come up with better and clean solution than this.

    It would be great if you can please share with me the nature of error / actual error you faced. Looking at your proposed solution it seems like the issue came up through action attribute’s value in <form> tag.

    Thanks

    AMP Supremacy Team

Viewing 1 replies (of 1 total)
  • The topic ‘Recommended update (Error in validator)’ is closed to new replies.