Jump to content

Roope

Members
  • Posts

    212
  • Joined

  • Last visited

Contact Methods

  • Website URL
    https://blowback.fi/

Profile Information

  • Gender
    Male
  • Location
    Tampere, Finland

Recent Profile Visitors

5,699 profile views

Roope's Achievements

Sr. Member

Sr. Member (5/6)

123

Reputation

3

Community Answers

  1. No need be concerned but thanks for the notice, I pushed a fix for this. https://github.com/BlowbackAgency/EmailObfuscation/commit/8dd2a3c278b86a36329122aac5d9ef0db7875218
  2. Hello everybody ? and thanks for your patience! Finally ended my sabbath and updated the module with pull requests and fix for the apostrophe thingy. Also added missing PW namespace + Composer support. There you go!
  3. Hello all! An sorry for lousy support with this module - I'll try to be more supportive in the future. First af all.. I haven't made move to PHP8 yet since my whole web development work has been on slow burn for a year or so but things are moving forward and I'm getting back in track and also need to start moving my customer sites to PHP8 based server. So for starters I put up my dev stack with PW 3.0.210 and noticed that it requires at least PHP 8.1 to function properly. I installed PHP 8.1.10 and emo seems to work there as is with no problems so am I missing something? My error_reporting = E_ALL so I should get all warnings.
  4. Hi all! Just dropped in to say that this module is not abandoned. I’ve been super busy with my paying projects and also in personal life at the moment so I haven’t found time to fix current issues. If @patman or someone else is willing to push PRs or even to make full rewrite I’m happy to pull them in. Current issues are easy to fix tho but unfortunately my time is VERY limited for the rest of the year.
  5. You'll need to save your modifications by using $page->save() method: https://processwire.com/api/ref/page/save/ So just replace: $ts_entry->edit(); With: $ts_entry->save();
  6. Hello @Robin S - and thanks for your efforts! I've optimized the auto init a bit so that it kicks in earlier and now it is in the line with 1.1 version. Or actually it is slightly faster and FOUC is almost unvisible. I also implemented the other two suggestions that you had: Wrapped replace text to noscript tag instead of span that prevents FOUC completely. Also added version number to JS autoload filename as a query string. While I was there I replaced skipped form tag with individual form elements and also added couple of attributes to the mix. Now obfuscation is skipped in following: Tags: head, script, textarea, option, output, input Attributes: value, label, data Version 1.2.4 is available at Github: https://github.com/BlowbackDesign/EmailObfuscation/releases/tag/1.2.4
  7. Yes, I'm well aware that it is completely valid to have inputs and such outside of a form element and with email address EMO breaks the markup but I thought this was not the issue in your case since there was already previous post from creativejay about problems with FormBuilder and you also mentioned that EMO shoudn't touch values of form elements but you were literally talking about inputs and such, not the form element itself. Sorry about that. There are also another technically valid situations where EMO fails e.g. like having an email inside data attribute. Generally it is kind of compicated topic to automatically replace email address by new node in every possible case without breaking things. Anyway, current state where EMO skips whole content inside form element is not ideal since there are many cases where you can have email addresses inside form where they should get obfuscated but currenly are not. Like the one in my previous form example where email inside p element should be touched but it's not. That said maybe we should remove the form element completely from ignored elements and concentrate only at form elements (what you suggested actually) like input, option and textarea where most likely touching email addresses will give us headaches. I'll look into it.
  8. Hi all! Issue with script insert to the head section is now fixed in version 1.2.3 https://github.com/BlowbackDesign/EmailObfuscation/releases/tag/1.2.3 @CalleRosa40 and @Brian Williamson please update and report back if you're still facing any problems. @creativejay and @Robin S - EMO has skipped form tags on obfuscation since day one and I haven't been able to reproduce this error so I'm kind of lost here why are you guys facing this issue with recent 1.2.x update. For example, none of the addresses in the markup below are not touched: <form action="/"> <p>john@doe.com</p> <input type="text" name="email" value="john@doe.com"> <textarea name="message">john@doe.com</textarea> </form> Using no-emo class on element to avoid obfuscation is a nice idea but not so easy to implement safely to the current logic based on regular expressions.
  9. Hello @CalleRosa40 and @Brian Williamson! And thanks for the notice! The logic with EMO insert changed at 1.2.x update and I haven't got time to push the update yet so in a meantime please use the version 1.1.1 instead as it works without any issues. I'll try to find some time to fix the script insert to head ASAP! https://github.com/BlowbackDesign/EmailObfuscation/releases/tag/1.1.1
  10. Hello @gebeer (and @grimezy) and thanks for the info! I was able to reproduce this and it was purely silly mistake I made when I was rearranging stuff. The is_array check in this condition is there only to prevent such a warning in array_key_exists function. This is now fixed in 1.2.1 version. And finally in 1.2.2 version. While I was there I also added conditional autoload to block admin pages which is proposed by @tpr in this thread already long ago. Thanks!
  11. I can't confirm. Running PW 3.0.123 + latest versions on both of modules. What kind of issues are you facing?
  12. New EMO version 1.2.0 released! https://github.com/BlowbackDesign/EmailObfuscation/releases/tag/1.2.0 In this version only encryption key is stored in the emo object of html document and crypted email strings as data attributes to span elements that are used to replace found email addresses. This makes it possible to obfuscate emails generated within AJAX request. There is also a new option at module config to lock the encryption key so that it does not change on every session like it does by default. This is required if you are caching AJAX output for more than session lifetime. Otherwise this option is good leave disabled. Here is quick example of a simple AJAX request with obfuscated output: <?php namespace ProcessWire; if($config->ajax) { $str = "<p><a href='mailto:foo@bar.com'>Click to mail</a></p>"; // auto obfuscation works only when complete html document is rendered so you // need to do manual obfuscation on AJAX calls even when mode is set to auto echo $sanitizer->emo($str); return $this->halt(); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>EMO ajax example</title> </head> <body> <p>john@doe.com</p> <div id="result"></div> <p><button onclick="sendExample()">Show me some</button></p> <script> var sendExample = function() { var xhttp = new XMLHttpRequest(); xhttp.open("POST", "<?= $page->url ?>", true); xhttp.setRequestHeader("X-Requested-With", "XMLHttpRequest"); xhttp.onreadystatechange = function() { if(this.readyState == 4 && this.status == 200) { document.getElementById("result").innerHTML = xhttp.response; // run emo init when there's something new to digest emo.init(); } }; xhttp.send(); }; </script> </body> </html>
  13. Hello @gebeer! I made a convert to object literal on your supposal but it had issue when "JavaScript loading method" was set to:manual (where emo.js is loaded after the inline script block). So script init is now again attached to the window onload event and emo.js can be included at any part of page. Thanks for the report! I also dropped ProcessWire namespace for continued 2.x support, thanks for a remind @Robin S! That was maybe too hesitated and no requirements for it. Version bumped to 1.1.1 and it's available at GitHub: https://github.com/BlowbackDesign/EmailObfuscation/releases/tag/1.1.1 Besides bugfixes this version adds support to multilanguage nosript text and template cache.
×
×
  • Create New...