Browse Source

Merge remote-tracking branch 'upstream/7.x-3.x' into 7.x-3.x

Ferrisx4 4 years ago
parent
commit
b48dd76bf2

+ 11 - 1
.all-contributorsrc

@@ -164,7 +164,8 @@
       "avatar_url": "https://avatars0.githubusercontent.com/u/38262122?v=4",
       "profile": "https://github.com/par12005",
       "contributions": [
-        "code"
+        "code",
+        "question"
       ]
     },
     {
@@ -193,6 +194,15 @@
       "contributions": [
         "code"
       ]
+    },
+    {
+      "login": "pgrimaud",
+      "name": "Pierre Grimaud",
+      "avatar_url": "https://avatars1.githubusercontent.com/u/1866496?v=4",
+      "profile": "https://github.com/pgrimaud",
+      "contributions": [
+        "doc"
+      ]
     }
   ],
   "contributorsPerLine": 7,

+ 2 - 1
README.md

@@ -115,10 +115,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
   </tr>
   <tr>
     <td align="center"><a href="http://www.vcru.wisc.edu/simonlab/sdata/software/index.html"><img src="https://avatars3.githubusercontent.com/u/8419404?v=4" width="100px;" alt=""/><br /><sub><b>Douglas Senalik</b></sub></a><br /><a href="https://github.com/tripal/tripal/commits?author=dsenalik" title="Code">💻</a></td>
-    <td align="center"><a href="https://github.com/par12005"><img src="https://avatars0.githubusercontent.com/u/38262122?v=4" width="100px;" alt=""/><br /><sub><b>par12005</b></sub></a><br /><a href="https://github.com/tripal/tripal/commits?author=par12005" title="Code">💻</a></td>
+    <td align="center"><a href="https://github.com/par12005"><img src="https://avatars0.githubusercontent.com/u/38262122?v=4" width="100px;" alt=""/><br /><sub><b>par12005</b></sub></a><br /><a href="https://github.com/tripal/tripal/commits?author=par12005" title="Code">💻</a> <a href="#question-par12005" title="Answering Questions">💬</a></td>
     <td align="center"><a href="http://sofiarobb.com"><img src="https://avatars0.githubusercontent.com/u/1072991?v=4" width="100px;" alt=""/><br /><sub><b>Sofia Robb</b></sub></a><br /><a href="https://github.com/tripal/tripal/commits?author=srobb1" title="Code">💻</a></td>
     <td align="center"><a href="https://github.com/katherynbuble"><img src="https://avatars3.githubusercontent.com/u/59714566?v=4" width="100px;" alt=""/><br /><sub><b>katherynbuble</b></sub></a><br /><a href="https://github.com/tripal/tripal/commits?author=katherynbuble" title="Code">💻</a></td>
     <td align="center"><a href="https://github.com/risharde"><img src="https://avatars3.githubusercontent.com/u/33866403?v=4" width="100px;" alt=""/><br /><sub><b>risharde</b></sub></a><br /><a href="https://github.com/tripal/tripal/commits?author=risharde" title="Code">💻</a></td>
+    <td align="center"><a href="https://github.com/pgrimaud"><img src="https://avatars1.githubusercontent.com/u/1866496?v=4" width="100px;" alt=""/><br /><sub><b>Pierre Grimaud</b></sub></a><br /><a href="https://github.com/tripal/tripal/commits?author=pgrimaud" title="Documentation">📖</a></td>
   </tr>
 </table>
 

+ 1 - 1
docs/contributing/governance.rst

@@ -24,7 +24,7 @@ These are developers who are extending Tripal. Extension contributors are encour
 
 Core Code Contributors
 ------------------------
-Core Code Contributors are active members of the Tripal community who make suggestions to improve and/or contribute code to Tripal Core. Core Code Contributors are encouraged to submit pull requests to the Tripal core and attend monthly user calls. For more information, see the `Guidelines for Contributing to Tripal core <https://tripal.readthedocs.io/en/latest/dev_guide/contributing/pull_requests.html>`_.
+Core Code Contributors are active members of the Tripal community who make suggestions to improve and/or contribute code to Tripal Core. Core Code Contributors are encouraged to submit pull requests to the Tripal core and attend monthly user calls. For more information, see the `Guidelines for Contributing to Tripal core <https://tripal.readthedocs.io/en/latest/contributing/pull_requests.html>`_.
 
 Responsibilities include:
  - Monitor Tripal core issue queue.

+ 1 - 1
docs/dev_guide/chado.rst

@@ -11,7 +11,7 @@ The Chado Query API
 
 Provides an API for querying of chado including inserting, updating, deleting and selecting from specific chado tables. There is also a generic function, ``chado_query()``, to execute and SQL statement on chado. It is ideal to use these functions to interact with chado in order to keep your module compatible with both local & external chado databases. Furthermore, it ensures connection to the chado database is taken care of for you.
 
-Generic Queries to a specifc chado table
+Generic Queries to a specific chado table
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Selecting Records

+ 1 - 1
docs/dev_guide/custom_field.rst

@@ -5,7 +5,7 @@ The most common way that new content will be added to an existing site is by cre
 
 By default Tripal v3 provides many fields for display of Chado data. However, you may find that these fields do not display data as you want, or you want to display data that the current fields do not already provide. This section of the Handbook describes how to create new fields that are integrated into the display, search and exchange abilities of both Drupal and Tripal.
 
-If you are already familiar with Drupal fields you may be aware of the API functions and hooks that Drupal provides.  However, for the quantity of fields needed to support biological data, the Drupal API hooks quickly become overwhelming.  Additionally, documentation for fields in the Drupal API can someitmes be difficult to discover when first working with fields.   Therefore, Tripal provides several new PHP classes to simplify creation of fields and to consolidate all functionality into one easy to find set of files.  To develop new fields you should be somewhat familar working with PHP's Object-Oriented Classes. The new classes provided by Tripal are these:
+If you are already familiar with Drupal fields you may be aware of the API functions and hooks that Drupal provides.  However, for the quantity of fields needed to support biological data, the Drupal API hooks quickly become overwhelming.  Additionally, documentation for fields in the Drupal API can someitmes be difficult to discover when first working with fields.   Therefore, Tripal provides several new PHP classes to simplify creation of fields and to consolidate all functionality into one easy to find set of files.  To develop new fields you should be somewhat familiar working with PHP's Object-Oriented Classes. The new classes provided by Tripal are these:
 
 
 +----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

+ 2 - 2
docs/dev_guide/custom_field/custom_formatter.rst

@@ -81,7 +81,7 @@ In summary, the following should be observed when processing the ``$items`` arra
 
 .. warning::
 
-  You should never have SQL statments or any API calls that retreive data in the foramter ``view()`` function. The formatter should strictly format data for viewing.
+  You should never have SQL statements or any API calls that retrieve data in the foramter ``view()`` function. The formatter should strictly format data for viewing.
   
 Creating Pagers
 ~~~~~~~~~~~~~~~
@@ -130,7 +130,7 @@ Now that we have a pager, it has been setup for AJAX and we know the current pag
       '#markup' => $content . $pager,
     );
     
-The settingsForm() Funtion.
+The settingsForm() Function.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Sometimes you may want to provide some control to the site developer for the formatter.  For example, the ``sbo__relationship_formater`` allows the site developer to customize the title that appears above the table that houses relationships and the text the appears if there are no relationships.  By default the title is "Relationships" and the empty text indicates there are no relationships. Both are a bit too generic.  The ``settingsForm()`` function allows you to provide a Drupal form for the field that appears on the **Administer > Strucutre > Tripal Content Types** on any content type's **manage display** page:
 

+ 4 - 4
docs/dev_guide/custom_field/manual_field_creation.rst

@@ -113,7 +113,7 @@ Sometimes a field is meant to provide a visualization or some other functionalit
 
   
   // A boolean specifying that the field will not contain any data. This
-  // should exclude the field from web serivces or downloads.  An example
+  // should exclude the field from web services or downloads.  An example
   // could be a quick search field that appears on the page that redirects
   // the user but otherwise provides no data.
 
@@ -198,7 +198,7 @@ Next, let's initialize our field's value to be empty.  When setting a field valu
     );
 
 
-Notice that our field has some sub elements. The first is 'und'.  This element corresponds to the "language" of the text.  Drupal supports mulitple spoken languages and wants to know the language of text we provide.  For Tripal fields we always use 'und' meaning 'undefined'.   The next element is the delta index number.  Field have a cardinality, or in other words they can have multiple values.  For every value we add we increment that index, always starting at zero.  The last element is our 'value' element and it is here where we put our element. You may notice that our **delta** index is hard coded to 0.  This is because an entity can only always have one organism that it is associated with.  We will never have more than one.
+Notice that our field has some sub elements. The first is 'und'.  This element corresponds to the "language" of the text.  Drupal supports multiple spoken languages and wants to know the language of text we provide.  For Tripal fields we always use 'und' meaning 'undefined'.   The next element is the delta index number.  Field have a cardinality, or in other words they can have multiple values.  For every value we add we increment that index, always starting at zero.  The last element is our 'value' element and it is here where we put our element. You may notice that our **delta** index is hard coded to 0.  This is because an entity can only always have one organism that it is associated with.  We will never have more than one.
 
 Now that we've got some preliminary values and we've initialized our value array we can start adding values!  Before we do though, let's double check that we have a record.  If we don't have a record for this entity, we can't get a value.
 
@@ -412,7 +412,7 @@ The array keys just mentioned fully describe our field to Drupal and Tripal.  Ne
             'required' => FALSE,
           ),
 
-Notice that our field will allow searching, provides a variety of search filter options, is sortable and defines the type as 'xs:string'.  The remaing elements follow the same pattern.  As another example, here is the genus element:
+Notice that our field will allow searching, provides a variety of search filter options, is sortable and defines the type as 'xs:string'.  The remaining elements follow the same pattern.  As another example, here is the genus element:
 
 .. code-block:: php
 
@@ -494,7 +494,7 @@ As described above in the elementInfo function section, some fields and elements
       }
     }
 
-The code above is how the field tells Drupal and Tripal how to find and filter the records that this field corresponds to.  First, we retreive the field alias and operators:and as with the load and elementInfo functions we get the controlled vocabulary terms for our field and field elements:
+The code above is how the field tells Drupal and Tripal how to find and filter the records that this field corresponds to.  First, we retrieve the field alias and operators:and as with the load and elementInfo functions we get the controlled vocabulary terms for our field and field elements:
 
 
 .. code-block:: php

+ 1 - 1
docs/dev_guide/custom_field/select_vocab_terms.rst

@@ -4,7 +4,7 @@ Selecting Vocabulary Terms
 Ontologies: what and why?
 -------------------------
 
-Tripal 3 requires all bundles and fields to be associated with a Controlled Vocabulary (CV). CVs are dictionaries of defined terms (CV terms) that make data machine-accessible, ensuring uniform terms are used across experiments, organisms and websites. Without CVterms, our scientific knowledge might be split by "dialects". Plant biologists might study temperature stress, while animal biologists study heat shock. Each group might benefit from the knowledge of the other, but they use a different vocabulary to describe the same thing, creating challenges for data discovery and exchange. CV terms make this easier not just for people, but especially for machines. Ontologies take this a step further. Where CVs are controlled lists of CVterms, ontologies are a controlled language, that include heirarchical relationships of terms.
+Tripal 3 requires all bundles and fields to be associated with a Controlled Vocabulary (CV). CVs are dictionaries of defined terms (CV terms) that make data machine-accessible, ensuring uniform terms are used across experiments, organisms and websites. Without CVterms, our scientific knowledge might be split by "dialects". Plant biologists might study temperature stress, while animal biologists study heat shock. Each group might benefit from the knowledge of the other, but they use a different vocabulary to describe the same thing, creating challenges for data discovery and exchange. CV terms make this easier not just for people, but especially for machines. Ontologies take this a step further. Where CVs are controlled lists of CVterms, ontologies are a controlled language, that include hierarchical relationships of terms.
 
 Tripal leverages vocabularies to make use of the `Semantic Web <https://en.wikipedia.org/wiki/Semantic_Web>`_. Every bundle and field defined in Tripal will be associated with a CVterm. Therefore, it is important to find community developed terms.  The `EMBL EBI Ontology Lookup Service <http://www.ebi.ac.uk/ols/index>`_ provides an easy location to search for and identify terms.  When choosing terms for new Bundles and Fields, think carefully about the terms you will use to describe your objects. Selecting the proper CV term that best describes the data may be the most challenging part of creating custom Bundles and Fields!
 

+ 1 - 1
docs/dev_guide/data_structures.rst

@@ -9,7 +9,7 @@ This page explains the relationships between Entity types, Bundles (content type
 * Entity Type:  despite the confusing name, an entity type is simply a group of bundles that are somehow related.  Drupal provides a "Node" Entity type that includes the Page and Article bundles.  All of the Tripal bundles (content types) belong to the TripalEntity Entity type.
 
 
-The following figure describes the heirarchical relationship between Drupal Entity types (e.g. Node) in comparison with TripalEntity entity types (e.g. Chromosome, Germplasm, etc.).
+The following figure describes the hierarchical relationship between Drupal Entity types (e.g. Node) in comparison with TripalEntity entity types (e.g. Chromosome, Germplasm, etc.).
 
 
 .. figure:: /_images/dev_guide/data_structures/Terminology-Diagram.png

+ 1 - 1
docs/dev_guide/introduction.rst

@@ -24,7 +24,7 @@ To use Chado for data storage:
 * Knowledge of Chado and relationships between tables (at least tables where data of interest is stored).
 * An idea how data is stored in Chado (or a willingness to ask questions)
 
-Things that will make your Tripal development experience postive, fun and rewarding:
+Things that will make your Tripal development experience positive, fun and rewarding:
 
 * A desire to write code that can be re-used and shared by other groups
 * A desire to share your work with others to support other the Tripal community members.

+ 12 - 0
docs/extensions/administrative.rst

@@ -3,6 +3,18 @@ Administrative
 
 The following modules provide support to Tripal site administrators.
 
+Private BioData
+-----------------
+
+.. image:: https://tripal.readthedocs.io/en/7.x-3.x/_images/Tripal-Gold.png
+  :target: https://tripal.readthedocs.io/en/7.x-3.x/extensions/module_rating.html#Gold
+  :alt: Tripal Rating: Gold
+  
+Make individual pages private while others of the same Tripal Content Type remain public! This module provides an additional permission, [Content type]: View Private Content for each Tripal Content Type and a TripalField to indicate which exact pages should be private.
+
+`Documentation <https://github.com/tripal/private_biodata/blob/master/README.md>`__
+`Repository <https://github.com/tripal/private_biodata>`__
+
 Tripal Alchemist
 -----------------
 

+ 1 - 1
docs/user_guide/bulk_loader.rst

@@ -316,7 +316,7 @@ Once complete, return to the search form, find a *Fragaria* species that has bee
 Sharing Your Templates with Others
 ----------------------------------
 
-Now that our template for loading organisms with NCBI Taxonomy IDs is completed we can share our template loader with anyone else that has a Tripal-based site.  To do this we simply export the template in text format, place it in a text file or directly in an email and send to a collaborator for import into their site.  To do this, navigate to **Tripal → Chado Data Loaders → Buik Loader** and click the **Tempalate** tab at the top.  Here we find a table of all the tempaltes we have created.  We should see our template named **NCBI Taxonomy Importer** (taxid, genus, species).  In the far right colum is a link to export that template.  Licking that link will redirect you to a page where the template is provided in a serialized PHP array.
+Now that our template for loading organisms with NCBI Taxonomy IDs is completed we can share our template loader with anyone else that has a Tripal-based site.  To do this we simply export the template in text format, place it in a text file or directly in an email and send to a collaborator for import into their site.  To do this, navigate to **Tripal → Chado Data Loaders → Buik Loader** and click the **Tempalate** tab at the top.  Here we find a table of all the templates we have created.  We should see our template named **NCBI Taxonomy Importer** (taxid, genus, species).  In the far right colum is a link to export that template.  Licking that link will redirect you to a page where the template is provided in a serialized PHP array.
 
 .. image:: ./bulk_loader.13.png
 

+ 2 - 2
docs/user_guide/content_types/configuring_page_display.rst

@@ -1,6 +1,6 @@
 Configuring Page Layout
 =======================
-This is one of the many new exciting features of Tripal v3. Integration with Drupal Fields has gone to a whole new level. Site builders have unprecendented control over the display of each piece of data through the administrative user interface. Previously, site builders were required to edit PHP template files to change the order, grouping or wording of content.
+This is one of the many new exciting features of Tripal v3. Integration with Drupal Fields has gone to a whole new level. Site builders have unprecedented control over the display of each piece of data through the administrative user interface. Previously, site builders were required to edit PHP template files to change the order, grouping or wording of content.
 
 You can configure the display of a given Tripal Content Type by navigating to **Structure → Tripal Content Types** and then selecting the **Manage Display** link beside the content type you would like to configure.
 
@@ -15,7 +15,7 @@ The Manage Display User Interface lists each Drupal Field in the order they will
 Rearranging Fields
 ------------------
 
-To rearrange the fields within a Tripal pane, simply drag them into the order you would like them. For example, the description is currently within the Summary table --it makes much more sense for it to be below the table but still within the summary. To do this, simply drag the description field to the bottom of the summary table and then move it in one level as shown in the following screenshot. Then click the **Save** button at the botton to save the changes.
+To rearrange the fields within a Tripal pane, simply drag them into the order you would like them. For example, the description is currently within the Summary table --it makes much more sense for it to be below the table but still within the summary. To do this, simply drag the description field to the bottom of the summary table and then move it in one level as shown in the following screenshot. Then click the **Save** button at the bottom to save the changes.
 
 .. image:: configuring_page_display.3.rearrange.png
 

+ 1 - 1
docs/user_guide/content_types/field_loading.rst

@@ -23,4 +23,4 @@ Depending on the number of fields for your content type and the amount of data t
 
 .. note::
  
-  You can control AJAX loading and hiding of empty fields differently for each conent type.
+  You can control AJAX loading and hiding of empty fields differently for each content type.

+ 1 - 1
docs/user_guide/install_tripal/drupal_home.rst

@@ -1,6 +1,6 @@
 DRUPAL_HOME Variable
 ====================
-An important convention in this document is the use of the ``$DRUPAL_HOME`` environment variable.  If you are new to UNIX/Linux you can learn about environment variables `here <https://www.tutorialspoint.com/unix/unix-environment.htm>`_.  Drupal is a necessary depenency of Tripal.  The setup and installation sections describe how to install Drupal.  If you follow the instructions exactly as described in this User's Guide you will install Drupal into ``/var/www/html``. However, some may desire to install Drupal elsewhere.  To ensure that all command-line examples in this guide can be cut-and-pasted you **must** set the ``$DRUPAL_HOME`` variable.  You can set the variable in the following way:
+An important convention in this document is the use of the ``$DRUPAL_HOME`` environment variable.  If you are new to UNIX/Linux you can learn about environment variables `here <https://www.tutorialspoint.com/unix/unix-environment.htm>`_.  Drupal is a necessary dependency of Tripal.  The setup and installation sections describe how to install Drupal.  If you follow the instructions exactly as described in this User's Guide you will install Drupal into ``/var/www/html``. However, some may desire to install Drupal elsewhere.  To ensure that all command-line examples in this guide can be cut-and-pasted you **must** set the ``$DRUPAL_HOME`` variable.  You can set the variable in the following way:
 
   .. code-block:: bash
 

+ 1 - 1
docs/user_guide/job_management.rst

@@ -6,7 +6,7 @@ Job Management (Tripal Daemon)
   Remember you must set the $DRUPAL_HOME environment variable to cut-and-paste the commands below. See see :doc:`./install_tripal/drupal_home`
 
 
-The Tripal Daemon module is meant to provide a simple means of creating a robust command-line-driven, fully bootstrapped PHP Daemon. It uses the PHP-Daemon (https://github.com/shaneharter/PHP-Daemon) Library to create the Daemon (via the Libraries API) in order to not re-invent the wheel. It allows you to execute Jobs submitted to Tripal without using cron.  It provides a faster user experience for running jobs.  Prior to Tripal v3, the Tripal Daemon module was an extension module. It was integrated into the core Tripal pacakge.
+The Tripal Daemon module is meant to provide a simple means of creating a robust command-line-driven, fully bootstrapped PHP Daemon. It uses the PHP-Daemon (https://github.com/shaneharter/PHP-Daemon) Library to create the Daemon (via the Libraries API) in order to not re-invent the wheel. It allows you to execute Jobs submitted to Tripal without using cron.  It provides a faster user experience for running jobs.  Prior to Tripal v3, the Tripal Daemon module was an extension module. It was integrated into the core Tripal package.
 
 Features
 --------

+ 1 - 1
docs/user_guide/searching/search_api.rst

@@ -32,7 +32,7 @@ This tutorial covers using a basic Drupal database storage backend for your sear
 .. figure:: ./search_api.2.png
 
 
-Before proceeding, consider deleting the "Default node index". We don't need it.  Next, click the **Add Server link**.  We are configuring a basic drupal database seach server we do not need to install any third-part software or set-up an external server. Instead, fill out the configuration form to tell the Search API to use its own database to store the search index.  Give this server the name "Drupal Database" and select "Database service" from the **Service Class** drop down.  In the **Database Service** section, select  "Search on parts of a word." If the search is slow due to this feature, then it is an indicator that your site should use a different service class (ie: Elastic Search or Apache Solr). Click "Create Server" to finish configuring the Search backend.
+Before proceeding, consider deleting the "Default node index". We don't need it.  Next, click the **Add Server link**.  We are configuring a basic drupal database search server we do not need to install any third-part software or set-up an external server. Instead, fill out the configuration form to tell the Search API to use its own database to store the search index.  Give this server the name "Drupal Database" and select "Database service" from the **Service Class** drop down.  In the **Database Service** section, select  "Search on parts of a word." If the search is slow due to this feature, then it is an indicator that your site should use a different service class (ie: Elastic Search or Apache Solr). Click "Create Server" to finish configuring the Search backend.
 
 
 .. figure:: ./search_api.3.png

+ 45 - 6
tripal_chado/includes/loaders/tripal_chado.pub_importer_AGL.inc

@@ -553,6 +553,31 @@ function tripal_pub_AGL_count($yazc, $search_str) {
   return $count;
 }
 
+/**
+ * Decode the unusal text encoding returned from our
+ * call to yaz_record(..., 'xml; charset=marc-8,utf-8')
+ * Some characters are in UTF-8, some are encoded as HTML
+ * entities, and some HTML entities are double-encoded,
+ * for example &amp;#x2018;
+ * A straight call to mb_convert_encoding() will corrupt
+ * any UTF-8 characters, so only convert what appears
+ * to be an HTML entity
+ *
+ * @param $text
+ *   The string to be decoded to "pure" UTF-8
+ *
+ * @return
+ *   The decoded string
+ *
+ * @ingroup tripal_pub
+ */
+function tripal_pub_AGL_decode($text) {
+  // first handle double encoding situations by replacing &amp;
+  $text = preg_replace("/&amp;/", "&", $text);
+  // then replace all HTML entities
+  return(html_entity_decode($text, ENT_COMPAT|ENT_HTML401, "UTF-8"));
+}
+
 /**
  * Parse publication XML for a single publication
  *
@@ -659,7 +684,10 @@ function tripal_pub_AGL_parse_pubxml($pub_xml) {
           foreach ($codes as $code => $value) {
             switch ($code) {
               case 'a': // System control number
-                $pub['Publication Accession'] = $value;
+                // rarely there will be a second control number with a "ns" prefix. Ignore them
+                if (!preg_match('/^ns/', $value)) {
+                  $pub['Publication Accession'] = $value;
+                }
                 break;
             }
           }
@@ -965,16 +993,16 @@ function tripal_pub_AGL_parse_pubxml($pub_xml) {
     $pub['Authors'] = $pub['Author List'];
   }
 
-  // for Title, Abstract, Authors, convert the html entity and remove special unicode chars that are not meant for display
-  $pub['Title'] = preg_replace('/[\p{So}]/u', '', mb_convert_encoding($pub['Title'], 'UTF-8', 'HTML-ENTITIES'));
+  // for several fields that may contain them, convert html entities to unicode characters
+  $pub['Title'] = tripal_pub_AGL_decode($pub['Title']);
   if (key_exists('Abstract', $pub)) {
-    $pub['Abstract'] = preg_replace('/[\p{So}]/u', '', mb_convert_encoding($pub['Abstract'], 'UTF-8', 'HTML-ENTITIES'));
+    $pub['Abstract'] = tripal_pub_AGL_decode($pub['Abstract']);
   }
   $newauths = [];
   if (array_key_exists('Author List', $pub)) {
     foreach ($pub['Author List'] AS $auth) {
       foreach ($auth AS $k => $v) {
-        $auth[$k] = preg_replace('/[\p{So}]/u', '', mb_convert_encoding($v, 'UTF-8', 'HTML-ENTITIES'));
+        $auth[$k] = tripal_pub_AGL_decode($auth[$k]);
       }
       array_push($newauths, $auth);
     }
@@ -983,9 +1011,20 @@ function tripal_pub_AGL_parse_pubxml($pub_xml) {
   else {
     $pub['Author List'] = [['Surname' => 'anonymous']];
   }
+  if (array_key_exists('Authors', $pub)) {
+    $pub['Authors'] = tripal_pub_AGL_decode($pub['Authors']);
+  }
+  if (array_key_exists('Keywords', $pub)) {
+    foreach ($pub['Keywords'] as &$keyword) {
+      $keyword = tripal_pub_AGL_decode($keyword);
+    }
+  }
+  if (array_key_exists('Notes', $pub)) {
+    $pub['Notes'] = tripal_pub_AGL_decode($pub['Notes']);
+  }
 
   // build the citation
-  $pub['Citation'] = chado_pub_create_citation($pub);
+  $pub['Citation'] = tripal_pub_AGL_decode(chado_pub_create_citation($pub));
 
   $pub['raw'] = $pub_xml;