Coder Social home page Coder Social logo

Quick post doesn't work about newpoints HOT 5 CLOSED

donqq avatar donqq commented on July 17, 2024
Quick post doesn't work

from newpoints.

Comments (5)

donqq avatar donqq commented on July 17, 2024

master...stormyqq:patch-1
It's fixed.

from newpoints.

DiogoParrinha avatar DiogoParrinha commented on July 17, 2024

Thanks :)

from newpoints.

DiogoParrinha avatar DiogoParrinha commented on July 17, 2024

Duplicate of #8 .

I can't accept your Pull Request because it modifies parts which are not required (only the preg_replace call which uses the e modified needs to be changed) and because your modification to the first call of preg_replace doesn't do what it's supposed to.

It's supposed to remove the quote tags, not to keep the quote tag that matches the first pattern, as your fix does. The code was originally part of http://forums.mybb-plugins.com/Thread-OUGC-Post-Character-Count-Enhancement but I failed to notice the e modified.

To my knowledge, simply removing it fixes the issue, because we don't need to evaluate any code within it. We just want to strip everything that matches the first pattern.

from newpoints.

DiogoParrinha avatar DiogoParrinha commented on July 17, 2024

Yes, your code made it compatible but wouldn't work as expected. It would give no warnings but the code wouldn't remove the quote tags properly. I've fixed it by simply removing the 'e' modified, which is deprecated and we don't need to eval anything so we don't need to use the _callback function.

Anyway, thanks for putting your time into this.

from newpoints.

DiogoParrinha avatar DiogoParrinha commented on July 17, 2024

I think you're not understanding. The callback function may be recommended but your solution would replace the match with the content of $match[0] which doesn't make sense because we want to strip the quote tag and its contents. Basically, your PR doesn't fix the issue, it fixes the warning.

from newpoints.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.