Sorry for the late reply.
Those comments are added for debugging purpose as they are useful when any user reports an issue.
This being an HTML comment does not affect anything.
As of now you can edit code and remove them.
I can add option in future release to make it optional.
+1
Those automatic comments cause problems when you want to enter raw text into a property of an html tag like an anchor tag. For example:
<a href="<!-- Shortcoder-Start...-->https://www.google.com<!-- Shortcoder-End -->" target="_blank">
That link above is totally malformed! There should be a way to turn off these HTML comments globally with a check button on the settings page, in all future versions of Shortcoder.
For now though, I had to do some plugin surgery to remove those annoying comment tags!!
This should NOT be necessary! π
Sorry for the exclamation points, but this is especially irritating.
@jamesandersonjr,
I guess you can make use of “custom parameters” to solve your use case here.
In your shortcode content, you can use
<a href="%%url%%"></a>
and use the shortcode as
[sc name="mylink" url="https://www.google.com"]
I’ll also consider removing the tags as many people consider it.
Thanks,
Aakash
I think you’re missing the point. I just want to use Shortcoder to store repetitive data that may one day change (e.g. a ‘click-to-dial’ telephone number, or postal address, or a URL), and when that day comes, I would like to change it in only one place, to populate everywhere that short-code is. As this plugin is, that functionality is being ruined by those pesky comment tags!
Example Code:
<a href="tel:1-<!-- Shortcoder-Start...-->555<!-- Shortcoder-End -->-<!-- Shortcoder-Start...-->555<!-- Shortcoder-End -->-<!-- Shortcoder-Start...-->5555<!-- Shortcoder-End -->">1-<!-- Shortcoder-Start...-->555<!-- Shortcoder-End -->-<!-- Shortcoder-Start...-->555<!-- Shortcoder-End -->-<!-- Shortcoder-Start...-->5555<!-- Shortcoder-End --></a>
Can you spot the issue with this anchor tag?? Will this number actually be callable, even while using the ‘tel:’ link-type?
While I can appreciate the purpose of debugging, I too would like to see these start/end comments removed.
Perhaps, as you say, have an option to remove them. Or perhaps show them if the following constants are set to TRUE in ‘wp-config.php’:
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
If possible, I try to avoid updating a plugin’s core files directly, as the changes will just be overwritten when the plugin is next updated.
Thanks.
-
This reply was modified 7 years, 7 months ago by
jumbo.
-
This reply was modified 7 years, 7 months ago by
jumbo.
@jumbo Thanks for the suggestion !!
Here’s another vote for the option to remove the comments. I’tried to use a shortcode inside a url, but the comment messed it up.
Great plugin BTW!