" it could be &grt;p ... somthing like this.If so then have to change the replace code accordingly.Let me know if this helps.
I have a regex issue and am wondering if someone can point out what I'm doing incorrectly. I'd like to strip the leading paragraph tag from visual format editor return string. I've read the tech article on this (50030) and looked at a few posts. If there is another that I've missed please point me in the right direction. With respect to article (50030) we've made the changes suggested in config.xml, visualformatconfig.xml but the leading paragraph tag is still there after cache is cleared.From reading previous responses it looks like the best way to handle this issue is to use regex to replace the tag. I'm just beginning to switch from using iw_tags to perl in my tpls. I have some basic perl knowledge but am not understanding what I'm doing wrong in this case. I've been experimenting so I have two versions of regex both work on my local machine and also when I test outside of the template at the command line on the server by placing them in a simple hello.pl script for testing. When I say "work" I mean they find and replace a { p } tag located in a paragraph of text.If I comment out the regex line in both examples - the text returns properly but with the leading { p } tag. This occurs with both versions of regex. Any advice on "how to fish" vs. just getting the answer is appreciated. I'm just at that "frustration" point. TeamSite 6.1 Solaris 9 thks - c360.755.2717 ...desk
my $text = strip_p_tags(iwpt_dcr_value('dcr.****.content'));sub strip_p_tags{ my $text = shift; $text =~ s|^\s*<p>(.*)</p>\s*$|$1|gmsi; return $text;}
Thank you for your reply - currently I'm not getting any results to return but will be playing with it until I do. Thanks again for responding - it seems this is rather constant complaint the [ p ] tag. I did do a good amount of testing with the ektron style sheet and so far getting rid of it is proving to be futile. I'll let you know what I get working and as always appreciate the help given.
Well I've made the noted changes and uploaded them to the server. I've cleared my local cache and also re-booted my machine cause I so love to do that. I'm not seeing any changes. There are the two files visualformatconfig.xml & config.xml - I've made the changes in 1 then the other - then just left them in both files. My problem aside - it would be nice to see if anyone has solved this issue only using the ektron stylesheets.I've uploaded them both so you can take a look.The end result....I still have the leading paragraph tag.
I've uploaded them both so you can take a look.
Hi,shiftenter="true" works fine with the changes you have made to visualformatconfig.xml , just restart the services.Also need to remember that this will only replace the {p} with {br} for all the {p's} except the leading one's.If your issue is with leading one only then you have work with perl code and as I mentioned earlier with the change to your perl code it should work fine.Here is what we have done.my $text = shift;$text =~ s/{p}/{br}/gi;
$text =~ s|</p>||gi;
Use the continueparagraph attribute. Set it to false (or maybe true) and the text is not wrapped in < p > tags.
I did not bother to read your entire email