When I do not set a class on admin/build/alinks/edit, and I go to a node that has alinks inside it, the module still tries to apply a style to it. If I go to view the source-code, I can see <a href=example.com class="" ....>alink example</a>. This is breaking some of our CSS.
Comments
Comment #1
DavidWhite commentedCertainly this isn't the cleanest way to do this, but it works. I nested another if/else statement into two of the current if/else statements, and it works. I also cleaned up the code a little and got rid of some unnecessary (old?) code.
Comment #2
DavidWhite commentedThere's a silly mistake in my code - take out the last 'absolute' => true. Here's the corrected code, with a little context. My own code starts at line 172 of the module:
Comment #3
greg boggsThis code is a jumbled mess. Anyone want to create a patch off the latest 7.x dev release
The logic would be a lot more maintainable and readable like:
Check values, assign attributes to an attributes variable as needed, create replacement based on $attributes[].
Comment #4
greg boggsComment #5
greg boggsI rewrote the link rewrite to conditionally rewrite the values of the link. This fixes both bad class and title tags when none are provided.