|
|
Rank: Devotee
Joined: 4/12/2007 Posts: 93 Location: Amsterdam
|
Hi all! I use somewhere the striphtml function but I've got a problem with it.........when it stripes for example this part: <p><strong>De ligging</strong></p><p>Finca Dulce Vida it end up with: De liggingFinca Dulce Vida . As you can imagine this is not what I would like to achieve........It looks like when there is a 'De ligging</strong></p><p>Finca' end p and begin p it's going wrong, I tested it to change it like <p><strong>De ligging </strong></p><p>Finca Dulce Vida (notice the space behind ligging) and then it works ok. Is it normal and if so can I change the striphtml behaviour for this?? thanks in advance, Chris
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 790 Location: Århus, Denmark
|
Well, i guess that prior to running the striphtml on your string, you could run a replace where you replace '</p>' with ' </p>' (notice the space). That would be a very simple solution to that problem. :-)
|
|
Rank: Devotee
Joined: 4/12/2007 Posts: 93 Location: Amsterdam
|
Thanks for replying morton! I already took the striphtml away and indeed it work well when I used the replace function to get away the <p> and </p>. The problem I have with this way is that I have to replace ALL html with the replace function and that made the site slower because the large replace function on it.......... I'm a C#/.NET noob myself but my colleque's (?) are bether with it. Is it possible to change the source of Umbraco to make the striphtml to do what I want......?? greetings, Chris
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 790 Location: Århus, Denmark
|
Actually what I was aiming at was just to prepare the text for the striphtml method. So first you do a simple replace of the ending </p> tag, where you add a space. And then you run the striphtml function on your new string, which will then take care of the tags them selves.
|
|
|
Guest |