Skip to content
This repository has been archived by the owner on Aug 1, 2018. It is now read-only.

Internal Links are parsed out for src and href #50

Open
abatkins opened this issue Mar 20, 2014 · 0 comments
Open

Internal Links are parsed out for src and href #50

abatkins opened this issue Mar 20, 2014 · 0 comments

Comments

@abatkins
Copy link

The parser is removing internal links from src and href. The cases I have found look like this:

<img src="/image.png"> => <img alt="">

and

<a href="/file.pdf"> => <a target="_blank"></a>

Tried overriding the parser rules in config/active_admin_editor.rb with:

  config.parser_rules['tags']['img'] = { # allows iframes
      check_attributes: {
          width: 'numbers',
          alt: 'alt',
          src: 'src', # if you compiled master manually then change this from 'url' to 'src'
          height: 'numbers'
      }
  }

However, this just made the src to be parsed out even if it had http:// in it.

The documentation says internal links are allowed, so I am not sure what the issue is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant