-
Notifications
You must be signed in to change notification settings - Fork 2.7k
AddHTML & or & breaks #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Of course, when the API works like every other API out there in the world, the following snippet should be the one to work:
|
Hi But i am getting illegal chars error message. However, it works when i double escape it. |
Hi |
Same issue here. |
+1 |
I think I found the issue, it's because authors of PHPWord use |
@dzafel The author thinks you should apply escaping yourself, even if that is impossible, such as in your case. Please see issue #401 for a depressing discussion I had with @RomanSyroeshko about why he thinks PHPWord should work differently from every other library ever developed. You'll probably be better off forking this repository and making the necessary changes yourself. |
@gmta yeah, I saw that thread. Unfortunatelly I don't have any time to wait for a fix, I made a dirty-fix for now - I cloned |
To those who prefer to argue and to complain instead of doing something with his hands making thus the world better. a) If you're brave, smart and experienced enough to define how a good open-source library should evolve, prove that and ask to be a part of the team. Many teams will be glad to have such professional. As for the PHPWord. As you can see by commit history, it experiences great lack of professional care. It needs you! So, you can try right here, right now. b) If you're maverick and working with existing team is not and option for you, you can always maintain a fork. God bless GitHub, because it allows us to do that in a few steps! c) If you're disappointed by people who maintain a library and don't like its codebase too, there is another option. Build your own next-gen library using all best practices, cutting-edge technologies and standards. I think this is the best option, because in a couple days with a few lines of code you can build a library which really rocks. If you're not following a), not following b) and not following c), all of your words are just "blah-blah blah-blah blah". Please, stop wasting other peoples' time. Believe or not, but that makes the world better too. Thanks. Nothing personal. |
Hi @klompenrunner, Thanks for the feedback. |
Taken from: Sample_26_Html.php
The sample works:
'<p>Some well formed HTML snippet needs to be used<p>';
Bad HTML like this as expected breaks the XML:
'<p>Some well formed HTML snippet needs & to be used<p>';
When I add an HTML ampersand it breaks the XML too:
'<p>Some well formed HTML snippet needs & to be used<p>';
But double escaping the ampersand makes it work.
'<p>Some well formed HTML snippet needs &amp; to be used<p>';
Tested with -master and -developer today.
The text was updated successfully, but these errors were encountered: