arnab / jQuery.PrettyTextDiff

A wrapper around Google's diff_match_patch library, to make life easy
MIT License
269 stars 55 forks source link

Added new functionality to allow users to send content to be diffed as p... #6

Closed LMcule closed 10 years ago

LMcule commented 10 years ago

...arameters to the 'prettyTextDiff' function.

Currently, the user has to set th text of the HTML elements i.e. the originalContainer and the changedContainer. This required the HTML content of the two containers to be part of the page source which caused web pages to be prone to XSS attacks. This method allows the user to set the HTML content to a JS variable and pass it as a parameter to this function. Both functionalities are supported to not break the existing plugin.

arnab commented 10 years ago

Excellent feature, thanks @shikher. Can I request you to make a couple of changes in this PR:

  1. Please document your new feature in the README's options section.
  2. Optionally, feel free to remove the js and minified js from your PR - I will generate those and push to jQuery plugins.

I'll merge as soon as I hear back on #1.

arnab commented 10 years ago

Also, if you really want to make this even better, add a jsfiddle (you can fork the one we have here and demo your feature there.

LMcule commented 10 years ago

Sure, I will make both the changes and add a link to the jsfiddle. Where should I mention the link to the jsfiddle?

On Mon, Aug 25, 2014 at 11:03 AM, Arnab Deka notifications@github.com wrote:

Also, if you really want to make this even better, add a jsfiddle (you can fork the one we have here http://jsfiddle.net/YwSVY/ and demo your feature there.

— Reply to this email directly or view it on GitHub https://github.com/arnab/jQuery.PrettyTextDiff/pull/6#issuecomment-53228152 .

arnab commented 10 years ago

Cool. You can add the link in the demo section in the README.

LMcule commented 10 years ago

Sounds good.

On Mon, Aug 25, 2014 at 11:12 AM, Arnab Deka notifications@github.com wrote:

Cool. You can add the link in the demo section in the README.

— Reply to this email directly or view it on GitHub https://github.com/arnab/jQuery.PrettyTextDiff/pull/6#issuecomment-53228573 .

LMcule commented 10 years ago

I have updated the pull request. Please look at the commit and let me know if any more changes are required.