Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Multiple "broken" in class attribute of HTML Content


Reply


3 Posts   1506 Views

Avatar
xmedeko

Community Member, 94 Posts

9 July 2007 at 11:27am

Hi,

if you one broken link more times in $Content, e.g. like:
<p><a href="xxx/">first</a> ... <a href="xxx/">second</a></p>

then, after a few times of reading the content and saving in CMS, thre is an attribute class="broken broken broken ...".

I have changed the Field() method in HtmlEditorField.php to avoid this:

// Mark up broken links
if ($links) {
$links = array_unique($links);
foreach($links as $link) {
...

Avatar
xmedeko

Community Member, 94 Posts

9 July 2007 at 11:39am

Sorry, one I have missed HTTP::getLinksIn(), so again:

// Mark up broken links
$links = HTTP::getLinksIn($content);
if ($links) {
$links = array_unique($links);
foreach($links as $link) {
...

Avatar
Andy

230 Posts

9 July 2007 at 12:39pm

Thanks, I've applied this.