Johan Steen
Forum Replies Created
-
That is a good suggestion and would probably be a useful addition to many of the users.
I’ll take a look at adding this for the next update.
Cheers,
JohanOh, so I don’t have misunderstood you, you are referring to use the snippet output ending up in HTML, right?
Not to access it from PHP with the new get_post_snippet() functionality?Yes, that is correct behaviour. The browser displays it as & even though it says &)amp; in the html code. If you write & directly in the html code the page won’t validate without errors, so in the html code all & needs to be &)amp;
You can try that by writing &)amp; in the code and you will see that it displays correctly and validates correctly.If you still for some reason really want & directly in your html you can’t insert it in the WordPress’ editor, because when the snippet is inserted into the editor, the plugin has no control over it anymore, and WP from that point does (correctly) convert all & into &)amp; for text and links with query strings containing parameters.
So you’d in that case need to insert it as a shortcode so WordPress editor doesn’t get a chance to touch it and then filter out the ampersand.
But I can’t change the plugin to use & instead of &)amp; because that would make invalid xhtml/html5 for all people using it to insert links with query strings, ie. link.php?var=something&var2=somethingselse. There it has to be ampersandamp; spelled out for validity.
See:
http://www.w3.org/TR/xhtml1/guidelines.html#C_12To quote the relevant part…
script that takes parameters, it must be expressed as:
http://my.site.dom/cgi-bin/myscript.pl?class=guest(&)amp;name=user
rather than as:
http://my.site.dom/cgi-bin/myscript.pl?class=guest&name=user.Hi,
Using (&)amp; in urls instead of & is actually the correct way to write url using & in html. Are you sure the url breaks when using it?
Thanks for the suggestion!
I’m doing some updating and maintenance work to the plugin now, and I’ll add your addition to the next update of the plugin (v 1.7.1) within a few days.
Cheers,
JohanForum: Plugins
In reply to: [Plugin: Google XML Sitemaps] Multi-page posts gets offsetted page numbersI made a quick fix in my install by changing:
$subPage = trailingslashit($permalink) . user_trailingslashit($p, 'single_paged');To:
$subPage = trailingslashit($permalink) . user_trailingslashit($p+1, 'single_paged');Perhaps not the prettiest solution, but now it works as expected.
It would be nice if this could be fixed in the plugin, so one doesn’t have to keep fixing this in coming updates of the plugin if the problem is still there then.
Forum: Plugins
In reply to: [Plugin: Post Snippets] Great Plugin ThanksThanks for your nice words! I am happy you find the plugin useful.
I’ve noticed the TinyMCE behavior you mentioned as well. I’ve planned to get rid of the window provided in TinyMCE completely in the next major update and replace it with my own window solution, which should allow for more flexibility and get rid of some of the limitations that come with the built in system more easily. That will probably take care of that behavior as well.
Forum: Plugins
In reply to: [Plugin: Post Snippets] HTML OnlyI just uploaded version 1.2, which should be available for download shortly.
It adds support for the HTML editor, by adding each defined snippet as a quicktag button in the editor. Let me know if there should be any problems with the new quicktag functionality in v1.2, but I think it should work as intended. I tested it quite a bit.
Forum: Plugins
In reply to: [Plugin: Post Snippets] HTML OnlyYes, currently they are only accessible from the visual editor. But that was a good idea, and I’ll implement support for the HTML editor as well in the next update. I think I’ll be able to do that this weekend.