You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/06/18 20:23:09 UTC

git commit: [#6359] Find shortlinks in raw text, not escaped html

Updated Branches:
  refs/heads/tv/6359 [created] 4e6c4b6d1


[#6359] Find shortlinks in raw text, not escaped html

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4e6c4b6d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4e6c4b6d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4e6c4b6d

Branch: refs/heads/tv/6359
Commit: 4e6c4b6d1e94a40acb83f9821d492d133c20a741
Parents: 524d440
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Jun 18 18:22:49 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Jun 18 18:22:49 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tasks/index_tasks.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4e6c4b6d/Allura/allura/tasks/index_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/index_tasks.py b/Allura/allura/tasks/index_tasks.py
index 27ada83..767cd89 100644
--- a/Allura/allura/tasks/index_tasks.py
+++ b/Allura/allura/tasks/index_tasks.py
@@ -55,8 +55,10 @@ def add_artifacts(ref_ids, update_solr=True, update_refs=True, solr_hosts=None):
                 if update_refs:
                     if isinstance(artifact, M.Snapshot):
                         continue
+                    # Find shortlinks in the raw text, not the escaped html
+                    # created by the `solarize()`.
                     ref.references = [
-                        link.ref_id for link in find_shortlinks(s['text']) ]
+                        link.ref_id for link in find_shortlinks(artifact.index().get('text', ''))]
             except Exception:
                 log.error('Error indexing artifact %s', ref._id)
                 exceptions.append(sys.exc_info())