ahmedkaludi / accelerated-mobile-pages

Automatically add Accelerated Mobile Pages (AMP Project) functionality on your WordPress.
http://ampforwp.com
Other
176 stars 96 forks source link

"Change Internal Links to AMP" not working properly for anchor tags (internal links) #2562

Closed Rkroy closed 5 years ago

Rkroy commented 6 years ago

Desc : Whenever we enable "Change Internal Links to AMP", the page internal links (anchor tags) are being malfunctioned and re-directed to other AMP page, When the option is disabled, then the internal links (anchor tags) are working fine. Ref : https://thebettervacation.com/metropolitan-museum-of-art-new-york/amp/

MARQAS commented 6 years ago

Another problem with internal links: https://secure.helpscout.net/conversation/662249094/34121?folderId=2090438

mdkaleem95 commented 6 years ago

Another problem: https://secure.helpscout.net/conversation/677203231/36238?folderId=1914712 But in this case, the anchor tag is getting removed in the span

MohammedKaludi commented 5 years ago

Keep $name_attr = $node->getAttribute( 'name' ); and create a new variable $id_attr = $node->getAttribute( 'id' );

https://github.com/ahmedkaludi/accelerated-mobile-pages/commit/83d19d14a5004f6a83296efeb6e286939ebc5de1#diff-9253027ab0fd0dc36f48733d5f042541L143

HANEEFRIYAZ commented 5 years ago

pushed in 0.9.97.22