HTML block - Link>Target Feature not sticking


Anyone having problems getting the Link Target New Window (_blank) to stick in the Page HTML block? The link itself is saving and sticking. I can enter the information in to all tabs within the Link HTML feature however the information entered in the Target tab refuses to stick. Below is the copied the Element code for the HTML Link Target tab and the saved link in the HTML block,

Element code - Link Target New Window (_blank)



<not set> <frame> <popup window> New Window (_blank) Topmost Window (_top) Same Window (_self) Parent Window (_parent)

Element code for saved Link Target New Window _blank)in HTML page block*

aboriginal rights

Thanks for any advice.


For some reason the element code didn’t save in the post. :persevere:

There’s a button in the text editor for pasting code - it looks like this: </> - you should be able to go in and edit your original post to change things from text to code.

A quick addition to this issue (I work with Libby).
I have also tried going into the source and manually adding target="_blank" to the anchor tag, but when you hit save on the page, this is removed also.

I have not been able to find any issue matching this on the CKEditor github, so I wonder if something in Omeka is stripping this out in the save.


Did a bit more googling for the issue on CKeditor stripping the target element, and came across a CKeditor setting: config.allowedContent = true;
Which reminded me that I ticked the Use HTMLPurifier in settings.
I unticked this setting and it now stops stripping the target attribute.

This seems like a bit of flaw to me, as the target attribute should be a very valid thing to have in the HTML code. Maybe my expectations of what HTMLpurifier does wasn’t quite right.


For S, we pretty much just use the standard HTMLPurifier set of allowed elements and attributes. I believe the issue here is that allowed target values need to be specifically configured for HTML Purifier to allow them.

In general stripped content will be coming from HTMLPurifier if it happens in Omeka S: we have CKEditor configured as you mention, with allowedContent set to true.

S doesn’t currently have much of a way to alter the HTML Purifier configuration short of editing the code, but that’s something we’ll look into.