Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL meant to be left as plaintext for WordPress to process is instead being converted on GIW sync #45

Closed
SienciLabs opened this issue Jul 23, 2024 · 6 comments

Comments

@SienciLabs
Copy link

SienciLabs commented Jul 23, 2024

Hello @vaakash!

Thanks for your prompt reply on my previous comment. I've since nearly achieved full compatibility of your plugin with my documentation site but there's still one issue remaining that I could use your help with:

  1. In WordPress, if you were to put in the text https://www.youtube.com/watch?v=dQw4w9WgXcQ then it would format the plain text into a YouTube video player
  2. The problem is that if I put this text into a .md file, then use Git it Write to sync the file to WordPress, then it gets formatted into <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">https://www.youtube.com/watch?v=dQw4w9WgXcQ</a>
  3. I've tried many things to stop this formatting from happening like using escape characters, span, <p> tags, <br> in <p> tags, and more and every approach I've tried so far hasn't worked

My question is: is there another way you can think to send the link as plain text - or - is there a way to add an exception to the plugin to cancel the auto-formatting? I could edit the plugin locally if you don't want to make it a permanent version change.

Thanks for the help. By the way if you're interested, this is the repo that I've been setting up to use your plugin for syncing: https://github.com/Sienci-Labs/Resources

@vaakash
Copy link
Owner

vaakash commented Jul 24, 2024

Hi @SienciLabs,

Thanks for the report. I'll look into this and see if it is transformed by parsedown or WordPress. My guess is it should be by WordPress. There should be some hook to disable this. I'll check and update.

@SienciLabs
Copy link
Author

SienciLabs commented Jul 30, 2024

Thanks for checking it out @vaakash, good luck. I've found it also can happen even inside a shortcode so it's disrupting GIW in 3 different ways so far unfortunately, but if this helps out it seems like <a> links are being imported fully correctly

If there's any way I can help out please let me know.

@SienciLabs
Copy link
Author

HI @vaakash, I think I found the source thanks to Walid who's on our team and helped me out. In includes ➜ parsedown.php ➜ line 55

If you paste in:
public function inlineUrl($excerpt) {
return;
}

Then it seems to strip out URL formatting and it arrives on the other end of WordPress correctly. Would you like me to submit a PR for this?

@vaakash
Copy link
Owner

vaakash commented Aug 1, 2024

Hi @SienciLabs,
Thanks for the analysis. I'll research further on this and publish a release after regression tests.

@vaakash
Copy link
Owner

vaakash commented Aug 3, 2024

Hi @SienciLabs,

This issue is fixed in v2.0. Please update the plugin to the same.

@vaakash vaakash closed this as completed Aug 3, 2024
@SienciLabs
Copy link
Author

Amazing! Glad to hear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants