%SafariTitle% broken in OS 10.11.5 beta (15F18c) (1st public)

Woke up this morning after installing the 1st public beta of OS 10.11.5.
Tried one of my Macros but it was not outputting the Safari Title?
I have quickly fixed this using a small apple script but my question is why this is not working any longer?

Can someone confirm the same behaviour?

Adding this little gif to illustrate.
You can see that the URL works fine but not the title.

Can someone confirm this?
Is it a bug in Safari 9 or is it due to a change in implementation?

Shall I report it to Apple?

Thanks for your time,


Seems a weird bug to have. Maybe Apple’s security people have gone insane. The title is got from simply JavaScript document.title.

Does this AppleScript work:

tell application "Safari"
	if it is running then
		tell document 1
			set r to do JavaScript "document.title"
			if r is missing value then
				set r to ""
			end if
		end tell
		set r to "Not Running"
	end if
end tell

Thank you!
JavaScript had been disabled from Apple events.
Enabled the option in the developer menu and now it works again.

Is that something you did, or something Apple did? If the latter, yes, you should report it as a bug so they know that it causes people problems, though likely they will just come back with “broken as designed”.

I did not turn this off manually.
I’ll report it to Apple so that they are aware of this.

Thanks for your help Peter!

I like that. :sunglasses:

Slight improvement:

Broken By Design

Yep, I had similar problem where I could no longer detect Safari field names. All I had to do is goto Safari>Developer menu and check the ‘Allow javascript from Apple events’ and I’m back in business.


Good catch!


All of a sudden I'm having a problem of the "SafariTitle" token not working. Last week, got a JavaScript error message (see attached), and now the macro to paste the Safari Title is not working at all.

I tried the AppleScript script that Peter posted above, but that didn't work either.

I'll try restarting the KM Engine once more. Any other suggestions?

Hey Bakari,

No such item attached.

Did you try the fix @coda found? That’s very likely the fix.


Opps, sorry about that. It’s updated.

Don’t know what the fix @coda is. I’ll search description in the forum.

I should have said above. :slight_smile:

1 Like

Okay, I just enabled that. Is that safe to do that?

Thanks for your help, btw.

Yes. For an intruder to do any mischief with it they’d have to already have pretty complete control of your system.

This “safeguard” Apple installed a couple of os versions ago is ludicrous, unwarranted, and unnecessary.

It’s caused many more headaches than it’s solved.


Thanks for letting me know this. I had seen it before, but wasn’t sure it was a good idea to enable it. Great to have the Safari Title action back.