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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

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

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

Multiple "broken" in class attribute of HTML Content


Go to End


3 Posts   1747 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
Andante

Community Member, 231 Posts

9 July 2007 at 12:39pm

Thanks, I've applied this.