caxy / php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML. Includes support for comparing complex lists and tables
http://php-htmldiff.caxy.com
GNU General Public License v2.0
202 stars 51 forks source link

Crashes if string contains "Р" character (uppercase cyrillic Р letter) #58

Closed Rastishka closed 7 years ago

Rastishka commented 7 years ago

Please add "/u" (PCRE_UTF8) modifier to regexps, if $config->setEncoding('UTF-8') is set.

jschroed91 commented 7 years ago

Thank you for submitting this issue @Rastishka - I will be able to make this change sometime this weekend, but if you need it sooner feel free to fork and make the changes and open a pull request!

SavageTiger commented 7 years ago

Hi Josh,

I took the time to look at this issue. However it seems invalid. I cannot for the live of me reproduce this issue. Maybe its only present in a certain PHP version.

Testing the following fixture seems to work fine:

<oldText> <div>Р ҦԤП п; italics: П п</div> </oldText>

<newText> <div>Its all gone!</div> </newText>

<expected> <div><del class="diffmod">Р ҦԤП п; italics: П п</del><ins class="diffmod">Its all gone!</ins></div> </expected>

Maybe the ticket should be closed?

jschroed91 commented 7 years ago

@Rastishka Closing this issue based on comment above - if this is still an issue please reopen and provide example text input for us to reproduce

jschroed91 commented 7 years ago

Thank you @SavageTiger!