heavyEddie Posted October 18, 2007 Share Posted October 18, 2007 I understand the basic concept of Tidy, but was curious if would allow me to customize the tags it recognizes and convert it to my own customized tags? I know I can use some preg commands for this purpose, but am kind of hoping it could be done at the same time I do some cleaning with tidy. Example: Dude, this is my wife.<comment>She is hot!</comment> would become: Dude, this is my wife. <span id="hot">She is hot!</comment> As always... your help and suggestions are welcome. Quote Link to comment https://forums.phpfreaks.com/topic/73874-what-can-tidy-do/ Share on other sites More sharing options...
trq Posted October 19, 2007 Share Posted October 19, 2007 I understand the basic concept of Tidy Im not sure you do. Tidy is designed to tidy html output. I don't see how this relates to your question at all. Quote Link to comment https://forums.phpfreaks.com/topic/73874-what-can-tidy-do/#findComment-372835 Share on other sites More sharing options...
Daniel0 Posted October 19, 2007 Share Posted October 19, 2007 Use DOM to step through the HTML and replace as you would like to. Quote Link to comment https://forums.phpfreaks.com/topic/73874-what-can-tidy-do/#findComment-372998 Share on other sites More sharing options...
heavyEddie Posted October 19, 2007 Author Share Posted October 19, 2007 I ended up taking a different approach by writing some smarty modifier plugins. Thanks Daniel0 for a positive response and suggestion. Quote Link to comment https://forums.phpfreaks.com/topic/73874-what-can-tidy-do/#findComment-373208 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.