You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trusfrated brought up issues with non-textual code being copied to the clipboard here.
Upon investigation, the problem was pretty obvious. GuideMe strips out any html tags in the page text, but it doesn't remove their contents, which isn't the correct behavior for some non-displayed tags like <script> and <style>. I'm not sure if there are any other tags that should be stripped out as well or not.
Beyond that, I think it'd be useful for a tease to be able to indicate that only certain content should be copied to the clipboard; this would for instance make it possible for PlayfulGuy's downloader to more accurately emulate EOS behavior involving changed say actions without having TTS repeat everything on a page after each action.
My suggestion for this would be to use something like
<span class='TTS'>This text will be copied to the clipboard.</span>And this text won't.
With the code only copying marked spans if any of them are present, and otherwise copying everything as it currently does. That way no existing content should change unexpectedly, and selecting by inclusion is probably going to be more reliable. It shouldn't conflict with the variable interpolation of since that regular expression would not catch a span with attributes. But there may be a better way that I'm not aware of.
The text was updated successfully, but these errors were encountered:
TTS definitely needs some work. I'm tagging this as both a bug (for reading JS and CSS), and an enhancement for adding more granular control over what it reads.
I like the idea of a class="TTS", but I'm curious how we would handle backwards compatibility. If we limit the TTS reader to only HTML entities with that class, we would essentially disable TTS for any existing teases before this was implemented.
I think it's reasonable to completely remove <style> and <script> nodes and their contents for TTS. That seems like an easy-ish resolution to the bug portion of this.
Trusfrated brought up issues with non-textual code being copied to the clipboard here.
Upon investigation, the problem was pretty obvious. GuideMe strips out any html tags in the page text, but it doesn't remove their contents, which isn't the correct behavior for some non-displayed tags like <script> and <style>. I'm not sure if there are any other tags that should be stripped out as well or not.
Beyond that, I think it'd be useful for a tease to be able to indicate that only certain content should be copied to the clipboard; this would for instance make it possible for PlayfulGuy's downloader to more accurately emulate EOS behavior involving changed say actions without having TTS repeat everything on a page after each action.
My suggestion for this would be to use something like
<span class='TTS'>This text will be copied to the clipboard.</span>And this text won't.
With the code only copying marked spans if any of them are present, and otherwise copying everything as it currently does. That way no existing content should change unexpectedly, and selecting by inclusion is probably going to be more reliable. It shouldn't conflict with the variable interpolation of since that regular expression would not catch a span with attributes. But there may be a better way that I'm not aware of.
The text was updated successfully, but these errors were encountered: