I don't think its a good idea to make this permanent because lets say you have ">"(greater than symbol) and/or "<"(less than symbol) anywhere in your text and you decode that then your HTML would become invalid basically
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please check the patch I submited, it only modifies text() and __get() functions. These functions doesn't return HTML so keeping HTML entities in it doesn't have any sense.
BTW, probably there is a bug in text() implementation as a same text can be decoded multiple times.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've solved it by adding a htmlspecialchars_decode() to any output function, but I suppose it should be fixed in the parser itself.
I don't think its a good idea to make this permanent because lets say you have ">"(greater than symbol) and/or "<"(less than symbol) anywhere in your text and you decode that then your HTML would become invalid basically
Please check the patch I submited, it only modifies text() and __get() functions. These functions doesn't return HTML so keeping HTML entities in it doesn't have any sense.
BTW, probably there is a bug in text() implementation as a same text can be decoded multiple times.
Thanks for including a patch.
Closing this in favor of https://sourceforge.net/p/simplehtmldom/feature-requests/52/ - please continue discussion on that ticket.